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

test shadowing function from base #22525

Closed
wants to merge 2 commits into from
Closed

Conversation

KristofferC
Copy link
Member

Closes #11723

@KristofferC KristofferC added backport pending 0.6 test This change adds or pertains to unit tests labels Jun 25, 2017
test/misc.jl Outdated
end
end"""

cmd = `$(Base.julia_cmd()) -e $str`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

startup-file=no

@KristofferC
Copy link
Member Author

Heh, this passes on 0.6 but on 0.7-dev we get:

WARNING: imported binding for diag overwritten in module Main
Unreachable reached at 0x7fa65d05366a

signal (4): Illegal instruction
while loading no file, in expression starting on line 0
macro expansion at ./REPL[0]:7 [inlined]
anonymous at ./<missing> (unknown line)
jl_call_fptr_internal at /home/kristoffer/julia/src/julia_internal.h:366 [inlined]
jl_call_method_internal at /home/kristoffer/julia/src/julia_internal.h:385 [inlined]
jl_toplevel_eval_flex at /home/kristoffer/julia/src/toplevel.c:594
jl_toplevel_eval_in at /home/kristoffer/julia/src/builtins.c:496
eval at ./boot.jl:236
jlcall_eval_18457 at /home/kristoffer/julia/usr/lib/julia/sys.so (unknown line)
jl_call_fptr_internal at /home/kristoffer/julia/src/julia_internal.h:366 [inlined]
jl_call_method_internal at /home/kristoffer/julia/src/julia_internal.h:385 [inlined]
jl_apply_generic at /home/kristoffer/julia/src/gf.c:1928
eval_user_input at ./repl/REPL.jl:67
jlcall_eval_user_input_20521 at /home/kristoffer/julia/usr/lib/julia/sys.so (unknown line)
jl_call_fptr_internal at /home/kristoffer/julia/src/julia_internal.h:366 [inlined]
jl_call_method_internal at /home/kristoffer/julia/src/julia_internal.h:385 [inlined]
jl_apply_generic at /home/kristoffer/julia/src/gf.c:1928
macro expansion at ./repl/REPL.jl:98 [inlined]
#1 at ./event.jl:73
unknown function (ip: 0x7fa65d04de1f)
jl_call_fptr_internal at /home/kristoffer/julia/src/julia_internal.h:366 [inlined]
jl_call_method_internal at /home/kristoffer/julia/src/julia_internal.h:385 [inlined]
jl_apply_generic at /home/kristoffer/julia/src/gf.c:1928
jl_apply at /home/kristoffer/julia/src/julia.h:1445 [inlined]
start_task at /home/kristoffer/julia/src/task.c:267
unknown function (ip: 0xffffffffffffffff)
Allocations: 1717317 (Pool: 1715911; Big: 1406); GC: 1
[1]    11070 illegal hardware instruction (core dumped)  ./julia

@KristofferC
Copy link
Member Author

cc @vtjnash @JeffBezanson

@martinholters
Copy link
Member

Bisected the crash to 753fbef. As this does not crash if either diag is renamed or the whole thing is wrapped in a function, my guess is that Triangular(lower, Base.diag, upper) is inferred, which is correctly determined as throwing a MethodError, but then Triangular(lower, diag, upper) is invoked, which does not throw, hence Unreachable reached. Sounds like #11723 has never really been fixed. Especially for #11723 (comment) I still get the same output.

@martinholters
Copy link
Member

What's the status here?

@KristofferC KristofferC reopened this Sep 22, 2018
# required to exhibit bug
diag = ones(5)

A = Tridiagonal(lower,diag,upper)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now requires a using LinearAlgebra.

@DilumAluthge DilumAluthge deleted the kc/check_overwritten branch March 25, 2021 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test This change adds or pertains to unit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Method not found when shadowing function from base with a local variable
4 participants