-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a check to reactor modules to ensure _initialize is only called once #388
Add a check to reactor modules to ensure _initialize is only called once #388
Conversation
149319f
to
a5dc0c1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable to me. I'll wait @sunfishcode for chime in too though.
Sounds like a good idea to me. We should also add code to do this with atomics when |
Calling _initialize multiple times is undefined behavior, since the ctors are not guaranteed to be idempotent. We should have this safety check which is similar to #329.
a5dc0c1
to
7c4c731
Compare
@sunfishcode The check logic when |
Thanks! |
This brings in two recent commits, WebAssembly/wasi-libc#388 and WebAssembly/wasi-libc#391, that seem useful to have.
This brings in two recent commits, WebAssembly/wasi-libc#388 and WebAssembly/wasi-libc#391, that seem useful to have.
…nce (WebAssembly#388) Calling _initialize multiple times is undefined behavior, since the ctors are not guaranteed to be idempotent. We should have this safety check which is similar to WebAssembly#329.
Calling _initialize multiple times is undefined behavior, since the ctors are not guaranteed to be idempotent. We should have this safety check which is similar to #329.