-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
SharedArrays convert-to-array method broken #16782
Comments
converting a SharedArray to an Array (per the fallback call-to-convert fallback constructor) simply discards the wrapper that owns the lifetime of the finalization of the inner Array object. The gc happily cleans up the garbage and deletes both. (accessing a field directly, such as |
More specifically, accessing a field that is not documented to be accessed directly is considered undefined behavior. This is especially true for types that has finalizers since the lifetime of the fields might be managed by the finalizer on the parent. |
I found that the |
I have run into some problems when using
SharedArrays
in functions. Simple example:When starting julia with
julia -p 4
:calling
foo()
gives:
This does not occur when only one worker is active or if julia is started with
julia
and thenaddprocs(4)
is called. However, a slightly alternated function:gives a segmentation fault, no matter if julia is started in parallel or
addprocs(4)
is called.Also:
and then calling
does not give an error.
FYI:
Best regards, Felix.
The text was updated successfully, but these errors were encountered: