Skip to content

Segfault on tuple-type return type declaration #21271

@cstjean

Description

@cstjean

This code didn't segfault on 0.5. (I know --- this isn't correct Julia; #11535, #10947)

   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.6.0-pre.beta.15 (2017-04-04 12:08 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 18e864b828 (0 days old master)
|__/                   |  x86_64-apple-darwin13.4.0

julia> foo()::Tuple{Type{Int}, Type{Float64}} = (Int, Float64)
foo (generic function with 1 method)

julia> foo()

signal (4): Illegal instruction: 4
while loading no file, in expression starting on line 0
foo at ./<missing>:0
unknown function (ip: 0x31ab5970f)
do_call at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/interpreter.c:75
eval at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/interpreter.c:242
jl_interpret_toplevel_expr at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/interpreter.c:34
jl_toplevel_eval_flex at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/toplevel.c:577
jl_toplevel_eval_in at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/builtins.c:484
eval at ./boot.jl:235
jlcall_eval_18129 at /Applications/Julia-0.6.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
eval_user_input at ./REPL.jl:66
unknown function (ip: 0x31ab55976)
macro expansion at ./REPL.jl:97 [inlined]
#1 at ./event.jl:73
unknown function (ip: 0x31ab5074f)
jl_apply at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/./julia.h:1416 [inlined]
start_task at /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/task.c:261
Allocations: 1432893 (Pool: 1431447; Big: 1446); GC: 0
Illegal instruction: 4

It might be because convert returns a value of the "wrong" type; T = Tuple{Type{Int}}; convert(T, (Int,))::T is an error.

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or unintended behavior

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions