Skip to content

[mono] Fix a crash in mono_jit_info_table_foreach_internal (). - #96771

Merged
vargaz merged 1 commit into
dotnet:mainfrom
vargaz:jit-info-foreach
Jan 10, 2024
Merged

vargaz merged 1 commit into
dotnet:mainfrom
vargaz:jit-info-foreach

Conversation

@vargaz

@vargaz vargaz commented Jan 10, 2024

Copy link
Copy Markdown
Contributor

The crash can happen if another thread was resizing the jit info table while the eventpipe thread was iterating it. The hazard pointer used to keep the table alive was also used by some runtime code which was called from the foreach callback i.e. from fire_method_events ().

As a workaround, use a different hazard pointer index which is not used by other runtime code right now.

The crash can happen if another thread was resizing the jit info
table while the eventpipe thread was iterating it. The hazard pointer
used to keep the table alive was also used by some runtime code
which was called from the foreach callback i.e. from fire_method_events ().

As a workaround, use a different hazard pointer index which is not
used by other runtime code right now.
@vargaz
vargaz requested a review from lateralusX January 10, 2024 16:44
@ghost ghost added the area-VM-meta-mono label Jan 10, 2024
@ghost ghost assigned vargaz Jan 10, 2024
@vargaz
vargaz merged commit d5c682c into dotnet:main Jan 10, 2024
@vargaz
vargaz deleted the jit-info-foreach branch January 10, 2024 20:46
tmds pushed a commit to tmds/runtime that referenced this pull request Jan 23, 2024
…t#96771)

The crash can happen if another thread was resizing the jit info
table while the eventpipe thread was iterating it. The hazard pointer
used to keep the table alive was also used by some runtime code
which was called from the foreach callback i.e. from fire_method_events ().

As a workaround, use a different hazard pointer index which is not
used by other runtime code right now.
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants