Skip to content

Make catch thread safe#3879

Merged
daxpedda merged 1 commit intowasm-bindgen:mainfrom
daxpedda:catch-atomics
Mar 10, 2024
Merged

Make catch thread safe#3879
daxpedda merged 1 commit intowasm-bindgen:mainfrom
daxpedda:catch-atomics

Conversation

@daxpedda
Copy link
Copy Markdown
Member

@daxpedda daxpedda commented Mar 9, 2024

After some significant amount of time debugging corrupted memory, I found the culprit of some random crashes I had: a static mut was used to implement catch, which obviously introduces a race condition if mutated and accessed from multiple threads at the same time.

My assumption here is that this was done to preserve no-std, which has been broken a long time ago. I also double-checked all other statics, but didn't find any other culprits.

@daxpedda daxpedda merged commit 1317b34 into wasm-bindgen:main Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants