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 with @noinline + isbits branch #11904

Closed
johnmyleswhite opened this issue Jun 28, 2015 · 0 comments
Closed

Segfault with @noinline + isbits branch #11904

johnmyleswhite opened this issue Jun 28, 2015 · 0 comments
Assignees

Comments

@johnmyleswhite
Copy link
Member

julia> @noinline throw_error() = error()
throw_error (generic function with 1 method)

julia> for f in (:(Base.(:+)), )
           @eval begin
               @inline function $(f){S}(x::Nullable{S})
                   if isbits(S)
                       Nullable($(f)(x.value), x.isnull)
                   else
                       throw_error()
                   end
               end
           end
       end

julia> +Nullable(1)
signal (11): Segmentation fault: 11
_ZN4llvm8LoadInstC2EPNS_5ValueEPKcbPNS_11InstructionE at /Users/johnmyleswhite/julia-0.4/usr/lib/libjulia.dylib (unknown line)
_ZNK4llvm9IRBuilderILb1ENS_14ConstantFolderENS_24IRBuilderDefaultInserterILb1EEEE6InsertINS_8LoadInstEEEPT_S8_RKNS_5TwineE at /Users/johnmyleswhite/julia-0.4/usr/include/llvm/IR/IRBuilder.h:453
_ZL13emit_functionP17_jl_lambda_info_t at /Users/johnmyleswhite/julia-0.4/src/codegen.cpp:4692
_Z19jl_eh_restore_stateP13_jl_handler_t at /Users/johnmyleswhite/julia-0.4/src/./julia.h:1346
jl_compile at /Users/johnmyleswhite/julia-0.4/src/codegen.cpp:903
jl_trampoline_compile_function at /Users/johnmyleswhite/julia-0.4/src/builtins.c:963
jl_apply at /Users/johnmyleswhite/julia-0.4/src/./julia.h:1260
jl_apply at /Users/johnmyleswhite/julia-0.4/src/gf.c:1639
jl_apply at /Users/johnmyleswhite/julia-0.4/src/interpreter.c:55
eval at /Users/johnmyleswhite/julia-0.4/src/interpreter.c:212
jl_toplevel_eval_flex at /Users/johnmyleswhite/julia-0.4/src/toplevel.c:517
jl_toplevel_eval_in at /Users/johnmyleswhite/julia-0.4/src/builtins.c:548
eval_user_input at REPL.jl:62
jlcall_eval_user_input_21539 at  (unknown line)
anonymous at task.jl:91
jl_apply at /Users/johnmyleswhite/julia-0.4/src/task.c:233
Segmentation fault: 11
@Keno Keno self-assigned this Jun 28, 2015
Keno added a commit that referenced this issue Jun 28, 2015
When in branches that type inference knows are dead, type information
can be inaccurate and codegen basically just needs to bail out as fast
as possible.
@Keno Keno closed this as completed in 9abe7fe Jun 28, 2015
JeffBezanson added a commit that referenced this issue Jun 28, 2015
KristofferC pushed a commit to KristofferC/julia that referenced this issue Jun 30, 2015
When in branches that type inference knows are dead, type information
can be inaccurate and codegen basically just needs to bail out as fast
as possible.
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