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: which(which, (Function, (Int, Int))) #11238

Closed
jayschwa opened this issue May 11, 2015 · 3 comments
Closed

Segfault: which(which, (Function, (Int, Int))) #11238

jayschwa opened this issue May 11, 2015 · 3 comments
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@jayschwa
Copy link
Member

julia> versioninfo()
Julia Version 0.4.0-dev+4781
Commit b458ea3 (2015-05-11 21:02 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin14.3.0)
  CPU: Intel(R) Core(TM) i7-3840QM CPU @ 2.80GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

julia> which(which, (Function, (Int, Int)))

signal (11): Segmentation fault: 11
jl_gf_invoke_lookup at /Users/jweisskopf/personal/julia/src/gf.c:1777
which at reflection.jl:220
jl_apply at /Users/jweisskopf/personal/julia/src/gf.c:1750
jl_apply at /Users/jweisskopf/personal/julia/src/interpreter.c:55
eval at /Users/jweisskopf/personal/julia/src/interpreter.c:212
jl_toplevel_eval_flex at /Users/jweisskopf/personal/julia/src/toplevel.c:507
jl_eh_restore_state at /Users/jweisskopf/personal/julia/src/./julia.h:1368
eval_user_input at REPL.jl:62
jlcall_eval_user_input_296976 at  (unknown line)
anonymous at task.jl:91
jl_apply at /Users/jweisskopf/personal/julia/src/task.c:234
fish: Job 1, 'julia' terminated by signal SIGSEGV (Address boundary error)

I tried collecting a backtrace with gdb, but I haven't done it before and was running into some issues.

@vtjnash
Copy link
Sponsor Member

vtjnash commented May 12, 2015

julia> which(which, Tuple{Function, (Int, Int)})
which(f::ANY,t::ANY) at reflection.jl:208

julia> which(which, Tuple{Function, Tuple{Int, Int}})
which(f::ANY,t::ANY) at reflection.jl:208

julia> which(which, (Function, Tuple{Int, Int}))
which(f::ANY,t::ANY) at reflection.jl:208

julia> which(which, (Function, (Int, Int)))

signal (11): Segmentation fault: 11
jl_gf_invoke_lookup at /Volumes/Lion/Users/jameson/Documents/julia/src/gf.c:1777
which at no file (unknown line)
jl_apply_generic at /Volumes/Lion/Users/jameson/Documents/julia/src/gf.c:1750
do_call at /Volumes/Lion/Users/jameson/Documents/julia/src/interpreter.c:55
eval at /Volumes/Lion/Users/jameson/Documents/julia/src/interpreter.c:212
jl_toplevel_eval_flex at /Volumes/Lion/Users/jameson/Documents/julia/src/toplevel.c:507
jl_eh_restore_state at /Volumes/Lion/Users/jameson/Documents/julia/src/./julia.h:1368
eval_user_input at no file (unknown line)
jlcall_eval_user_input_44323 at no file (unknown line)
jl_apply at /Volumes/Lion/Users/jameson/Documents/julia/src/./julia.h:1280
anonymous at no file (unknown line)
start_task at /Volumes/Lion/Users/jameson/Documents/julia/src/task.c:234

looks like an inconsistency in the conversion from () -> Tuple{} in the nested case?

@vtjnash vtjnash added the bug Indicates an unexpected problem or unintended behavior label May 12, 2015
@carnaval
Copy link
Contributor

I thought the () for reflection functions was only a stopgap until we get a more concise syntax for Tuple{}. I think the nested thing should simply not be handled, it's just not a type anymore. An error instead of a segfault would certainly be nice.

@yuyichao
Copy link
Contributor

I guess I can shamelessly bring up an old issue I reported #9580 . Would be nice to make sure certain type parameters can only be types.

mbauman pushed a commit to mbauman/julia that referenced this issue Jun 6, 2015
tkelman pushed a commit to tkelman/julia that referenced this issue Jun 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

4 participants