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

New Segfault in Cxx #15528

Closed
Keno opened this issue Mar 16, 2016 · 3 comments
Closed

New Segfault in Cxx #15528

Keno opened this issue Mar 16, 2016 · 3 comments

Comments

@Keno
Copy link
Member

Keno commented Mar 16, 2016

Here's the relevant part of the stack trace:

#4  0x00007ffff79a6a61 in jl_lam_vinfo (l=0x7ffdf132a490) at /home/ubuntu/julia-cxx/src/ast.c:932
#5  0x00007ffff79a7686 in jl_local_in_linfo (linfo=0x7ffdf6418a60, sym=0x7ffdf052b150) at /home/ubuntu/julia-cxx/src/ast.c:1100
#6  0x00007ffff7a2fa65 in jl_static_eval (ex=0x7ffdf052b150, ctx_=0x0, mod=0x7ffdf05e8910, linfo=0x7ffdf6418a60, sparams=1, allow_alloc=0)
    at /home/ubuntu/julia-cxx/src/codegen.cpp:1764
#7  0x00007ffff79d0fe6 in jl_has_intrinsics (li=0x7ffdf6418a60, e=0x7ffdf5e55770, m=0x7ffdf05e8910) at /home/ubuntu/julia-cxx/src/toplevel.c:251
#8  0x00007ffff79d107c in jl_has_intrinsics (li=0x7ffdf6418a60, e=0x7ffdf5e55750, m=0x7ffdf05e8910) at /home/ubuntu/julia-cxx/src/toplevel.c:264
#9  0x00007ffff79d107c in jl_has_intrinsics (li=0x7ffdf6418a60, e=0x7ffdf5e553d0, m=0x7ffdf05e8910) at /home/ubuntu/julia-cxx/src/toplevel.c:264
#10 0x00007ffff79d107c in jl_has_intrinsics (li=0x7ffdf6418a60, e=0x7ffdf5e553b0, m=0x7ffdf05e8910) at /home/ubuntu/julia-cxx/src/toplevel.c:264
#11 0x00007ffff799b677 in jl_get_unspecialized (method=0x7ffdf6418a60) at /home/ubuntu/julia-cxx/src/gf.c:337
#12 0x00007ffff79a0f25 in jl_apply_generic (args=0x7fffffff4180, nargs=6) at /home/ubuntu/julia-cxx/src/gf.c:1860

The problem is that in the topmost frame l->ast is compressed when it expects it to be uncompressed. The immediate cause is 394e7ab (cc @JeffBezanson) but that may have just exposed a deeper underlying issue. At the moment I don't think this is a Cxx bug. Also cc @vtjnash who wrote some of this code. Ref JuliaInterop/Cxx.jl#236.

@vtjnash
Copy link
Member

vtjnash commented Mar 16, 2016

i think this would be fixed by ad914a7 (avoiding this segfault was the original reason i tried moving the jl_has_intrinsics call earlier)

@Keno
Copy link
Member Author

Keno commented Mar 18, 2016

I just encountered the exact same problem while working on DWARF.jl. Isn't there any way to fix this without rewriting the whole AST representation first?

@vtjnash
Copy link
Member

vtjnash commented Mar 29, 2016

resolved by #15609

@vtjnash vtjnash closed this as completed Mar 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants