Crashpad crash collection is not thread-safe #931
Labels
area: backend
area: core
backend: crashpad
bug
Something isn't working
Platform: Linux
Platform: Windows
Description
During
sentry__crashpad_handler
crash_event
is not synchronized properly.When does the problem happen
Environment
Steps To Reproduce
For example
sentry_set_tag
that executed from one thread andsentry__crashpad_handler
that capturing crash in another thread, may lead to a race condition while accessingcrash_event
variable.sentry_set_tag
call would lead tosentry__scope_flush_unlock
call, that would lead tooptions->backend->flush_scope_func
that would lead tocrashpad_backend_flush_scope
and access to acrash_event
that may be freed by that line https://github.com/getsentry/sentry-native/blob/164da7919172b0df9c7b75efbc36e6e897124415/src/backends/sentry_backend_crashpad.cpp#L174C4-L174C4.The text was updated successfully, but these errors were encountered: