-
Notifications
You must be signed in to change notification settings - Fork 58
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
Segfault in package using Nemo with MP integers #790
Comments
Is it normal that it tries to link to system GMP? I just updated the Arch GMP package, may it be related? |
You'll have to disable precompilation if you want to access x. Once it is precompiled, the original x is long gone and you just have an invalid pointer. As for the system GMP, no it should not be linking against that. I'm not sure why it would be doing that. We use the Julia binary builder for GMP. |
I see |
I'm not sure what you mean by "BigInt's can be precompiled". Does this same example work with Julia BigInt's? If it does, they must have done something tricky to make that work. As far as I know, any C object that is created during precompilation is not saved anywhere. When you refer to it after precompilation, it's just gone. I genuinely don't know how to make that work. |
For a long time it was not possible to precompile them, but it was fixed, see JuliaLang/julia#15722. |
I guess you know this already, but the workaround is to put it into the |
It does.
I'm still not a Julia expert, I didn't know about Anyway, I think this can be closed. If there's a motivation to write serializers/deserialezers, a different issue should be open. Thank you both! |
This simple module causes a segfault when in a Julia package (not if it is included in the REPL, though, so it's likely related to compilation):
to trigger the segfault, load
Bug
and try to displayx
:if I change the definition to
x = ZZ(2)^61
, the segfault goes away.Using Nemo v0.16.2 in Julia 1.3.1 on Arch. I'm copying
Manifest.toml
for completeness.The text was updated successfully, but these errors were encountered: