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 the Vararg datatype #10925

Closed
jdlangs opened this issue Apr 21, 2015 · 8 comments · Fixed by #10934
Closed

Segfault with the Vararg datatype #10925

jdlangs opened this issue Apr 21, 2015 · 8 comments · Fixed by #10934

Comments

@jdlangs
Copy link
Contributor

jdlangs commented Apr 21, 2015

I was playing around with the new tuple syntax and came across this crash. Is the method definition itself nonsensical here?

julia> f(x::Vararg{Int}) = length(x)
f (generic function with 1 method)

julia> f()
ERROR: AssertionError: la == 0
 in typeinf_uncached at ./inference.jl:1664
 in typeinf at ./inference.jl:1304
 in typeinf_ext at ./inference.jl:1248

julia> f(1)

signal (11): Segmentation fault
unknown function (ip: -924344832)
unknown function (ip: -924134164)
unknown function (ip: -924133876)
jl_trampoline at /home/jdlangs/Documents/Projects/julia/usr/bin/../lib/libjulia.so (unknown line)
jl_apply_generic at /home/jdlangs/Documents/Projects/julia/usr/bin/../lib/libjulia.so (unknown line)
unknown function (ip: -924032813)
unknown function (ip: -924035646)
unknown function (ip: -923959389)
jl_toplevel_eval_in at /home/jdlangs/Documents/Projects/julia/usr/bin/../lib/libjulia.so (unknown line)
eval_user_input at REPL.jl:60
jlcall_eval_user_input_43978 at �% (unknown line)
jl_apply_generic at /home/jdlangs/Documents/Projects/julia/usr/bin/../lib/libjulia.so (unknown line)
anonymous at task.jl:89
unknown function (ip: -924008416)
unknown function (ip: 0)
Segmentation fault (core dumped)
@mbauman
Copy link
Sponsor Member

mbauman commented Apr 21, 2015

There's a little magic the parser does to prepare methods with the ... syntax that's not yet incorporated into the Vararg type. It'll be fixed with #10911.

@jdlangs
Copy link
Contributor Author

jdlangs commented Apr 21, 2015

Cool, I'll look forward to trying that out once it's merged.

@jdlangs jdlangs closed this as completed Apr 21, 2015
@StefanKarpinski
Copy link
Sponsor Member

I feel like a segfault on master is still a bug, no?

@pao
Copy link
Member

pao commented Apr 21, 2015

Yes.

@pao pao reopened this Apr 21, 2015
@pao pao changed the title Seg fault with the Vararg datatype Segfault with the Vararg datatype Apr 21, 2015
@mbauman
Copy link
Sponsor Member

mbauman commented Apr 21, 2015

I think @timholy's commit 76b2b26 in #10911 will stand on its own and can be committed before the rest of that PR. This is also an issue on 0.3, but I don't think anyone ever tried using Vararg before the tuple overhaul.

@jdlangs
Copy link
Contributor Author

jdlangs commented Apr 21, 2015

I wasn't sure, so thanks for clarifying the issue policy there.

@timholy
Copy link
Sponsor Member

timholy commented Apr 21, 2015

Yes, 76b2b26 probably would stand on its own. If people are in a rush I can cherry-pick it.

@JeffBezanson
Copy link
Sponsor Member

Sounds like a good idea to me. Fixing segfaults is always good!

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

Successfully merging a pull request may close this issue.

6 participants