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

Segfault from llvmjitcode test in Python 3.9 #21935

Closed
oscarbenjamin opened this issue Aug 24, 2021 · 3 comments · Fixed by #23742
Closed

Segfault from llvmjitcode test in Python 3.9 #21935

oscarbenjamin opened this issue Aug 24, 2021 · 3 comments · Fixed by #23742
Labels

Comments

@oscarbenjamin
Copy link
Collaborator

This test from the optional dependency tests fails with a segfault under Python 3.9:

from sympy.printing.llvmjitcode import llvm_callable
from sympy import cse
from sympy.abc import a, b, n

e1 = a*a
e2 = a*a + b*b
e3 = cse([e1, e2])

f = llvm_callable([a, b], e3)
jit_res = f(0.1, 1.5)

That gives:

$ python test.py 
Segmentation fault: 11

The test needs llvmlite to be installed (pip install llvmlite).

Originally posted by @oscarbenjamin in #21885 (comment)

@oscarbenjamin
Copy link
Collaborator Author

CC @markdewing

@bjodah
Copy link
Member

bjodah commented Aug 24, 2021

I think LLVM IR is a bit of a moving target, so I'm guessing llvmlite might have gotten a bump? Perhaps we need versioned printers (e.g. LLVM11JitPrinter, LLVM12JitPrinter, ...).

@oscarbenjamin
Copy link
Collaborator Author

Possibly fixed by #23513. See numba/llvmlite#838

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants