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

Segfaults for @code_llvm on generator internal function #16395

Closed
gasagna opened this issue May 16, 2016 · 2 comments
Closed

Segfaults for @code_llvm on generator internal function #16395

gasagna opened this issue May 16, 2016 · 2 comments

Comments

@gasagna
Copy link
Contributor

gasagna commented May 16, 2016

Hi,

This happened to me in the REPL while playing with generators:

   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.5.0-dev+4112 (2016-05-16 15:27 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 97dc858 (0 days old master)
|__/                   |  x86_64-apple-darwin15.4.0

julia> f = (i for i in 1:10)
Base.Generator{UnitRange{Int64},##1#2}(#1,1:10)

julia> fieldnames(f)
2-element Array{Symbol,1}:
 :f   
 :iter

julia> f.f(1)
1

julia> f.f(2)
2

julia> @code_native f.f

signal (11): Segmentation fault: 11
while loading no file, in expression starting on line 0
emit_function at /Users/davide/Software/julia/src/codegen.cpp:4000
to_function at /Users/davide/Software/julia/src/codegen.cpp:832
jl_compile_linfo at /Users/davide/Software/julia/src/codegen.cpp:1027
jl_get_llvmf at /Users/davide/Software/julia/src/codegen.cpp:1161
_dump_function at ./reflection.jl:307
unknown function (ip: 0x31e6484ab)
jl_call_method_internal at /Users/davide/Software/julia/src/./julia_internal.h:76
jl_apply_generic at /Users/davide/Software/julia/src/gf.c:1602
code_native at ./reflection.jl:329
unknown function (ip: 0x31e64715d)
jl_call_method_internal at /Users/davide/Software/julia/src/./julia_internal.h:76
jl_apply_generic at /Users/davide/Software/julia/src/gf.c:1602
code_native at ./reflection.jl:331
unknown function (ip: 0x31e6450f6)
jl_call_method_internal at /Users/davide/Software/julia/src/./julia_internal.h:76
jl_apply_generic at /Users/davide/Software/julia/src/gf.c:1602
do_call at /Users/davide/Software/julia/src/interpreter.c:58
eval at /Users/davide/Software/julia/src/interpreter.c:174
jl_interpret_toplevel_expr at /Users/davide/Software/julia/src/interpreter.c:25
jl_toplevel_eval_flex at /Users/davide/Software/julia/src/toplevel.c:545
jl_toplevel_eval at /Users/davide/Software/julia/src/toplevel.c:567
jl_toplevel_eval_in_warn at /Users/davide/Software/julia/src/builtins.c:547
jl_toplevel_eval_in at /Users/davide/Software/julia/src/builtins.c:514
eval at ./boot.jl:226
jlcall_eval_17886 at /Users/davide/Software/julia/usr/lib/julia/sys-debug.dylib (unknown line)
jl_call_method_internal at /Users/davide/Software/julia/src/./julia_internal.h:76
jl_apply_generic at /Users/davide/Software/julia/src/gf.c:1602
[inline] at ./REPL.jl:3
eval_user_input at ./REPL.jl:62
unknown function (ip: 0x31e5fb586)
jl_call_method_internal at /Users/davide/Software/julia/src/./julia_internal.h:76
jl_apply_generic at /Users/davide/Software/julia/src/gf.c:1602
[inline] at ./REPL.jl:92
#1 at ./event.jl:46
unknown function (ip: 0x3112c452f)
jl_call_method_internal at /Users/davide/Software/julia/src/./julia_internal.h:76
jl_apply_generic at /Users/davide/Software/julia/src/gf.c:1602
jl_apply at /Users/davide/Software/julia/src/./julia.h:1386
start_task at /Users/davide/Software/julia/src/task.c:253
Allocations: 2526698 (Pool: 2525566; Big: 1132); GC: 4
Segmentation fault: 11
@KristofferC
Copy link
Sponsor Member

#15606 maybe?

@yuyichao
Copy link
Contributor

Dup of #15606

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

3 participants