Skip to content
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

bad ccall is causing segfaulting on master #52

Closed
vtjnash opened this issue Jun 9, 2021 · 3 comments
Closed

bad ccall is causing segfaulting on master #52

vtjnash opened this issue Jun 9, 2021 · 3 comments
Assignees
Labels

Comments

@vtjnash
Copy link

vtjnash commented Jun 9, 2021

This ccall is broken on master, but is also unnecessary (since Julia v1.6)

MemPool.jl/src/lock.jl

Lines 28 to 29 in f62e3ec

enable_finalizers(on::Bool) = ccall(:jl_gc_enable_finalizers, Cvoid,
(Ptr{Cvoid}, Int32,), Core.getptls(), on)

Refs https://s3.amazonaws.com/julialang-reports/nanosoldier/pkgeval/by_date/2021-06/09/FileTrees.1.7.0-DEV-f442e4230a.log

@jpsamaroo
Copy link
Collaborator

Should be ccall(:jl_gc_enable_finalizers, Cvoid, (Ptr{Cvoid}, Int32,), C_NULL, on), probably due to JuliaLang/julia#40715. We can pass C_NULL since we're disabling finalizers on our current task/thread. Thanks for the report @vtjnash !

@jpsamaroo jpsamaroo self-assigned this Jun 9, 2021
@vtjnash
Copy link
Author

vtjnash commented Jun 9, 2021

It really probably shouldn't be there at all (and current task/thread is the only legal parameter there, so yes that must be the case)

@jpsamaroo
Copy link
Collaborator

Good point, now that SpinLock disables finalizers during lock calls.

jpsamaroo added a commit that referenced this issue Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants