-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 instead of throwing UndefVarError — includes rr trace #37265
Labels
Comments
@error
— includes rr trace
Simpler test script: f() = 1
g() = 2
function h(i)
if i == 1
s = f
elseif i == 2
s = g
else
@error("none")
end
s()
end
h(1) |
Slightly simpler, and without the macro: a() = 0
b() = 0
function c(d)
if 0
e = a
elseif 0
e = b
else
try
catch
end
end
e
end
c(0) |
Making this line https://github.com/JuliaLang/julia/blob/master/src/codegen.cpp#L6840 conditional on |
yuyichao
added a commit
that referenced
this issue
Aug 30, 2020
Fixes a crash when one of the incoming value for a union value phi node is `Union{}`. Incoming value of this type can be generated by try-catch. Fix #37265
yuyichao
added a commit
that referenced
this issue
Aug 30, 2020
Fixes a crash when one of the incoming value for a union value phi node is of type `Union{}`. Incoming value of this type can be generated by try-catch. Fix #37265
yuyichao
added a commit
that referenced
this issue
Aug 30, 2020
Fixes a crash when one of the incoming value for a union value phi node is of type `Union{}`. Incoming value of this type can be generated by try-catch. Fix #37265
yuyichao
added a commit
that referenced
this issue
Sep 1, 2020
Fixes a crash when one of the incoming value for a union value phi node is of type `Union{}`. Incoming value of this type can be generated by try-catch. Fix #37265
yuyichao
added a commit
that referenced
this issue
Sep 2, 2020
Fixes a crash when one of the incoming value for a union value phi node is of type `Union{}`. Incoming value of this type can be generated by try-catch. Fix #37265
KristofferC
pushed a commit
that referenced
this issue
Sep 7, 2020
KristofferC
pushed a commit
that referenced
this issue
Sep 7, 2020
KristofferC
pushed a commit
that referenced
this issue
Sep 8, 2020
KristofferC
pushed a commit
that referenced
this issue
Sep 10, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The test case from this discourse question leads to a segfault after the local function definitions are changed to either anonymous functions (which I tried locally) or local assignment of different functions (as shown in the third reply).
A later reply identified just changingThe@error
toerror()
in the function definition avoids the segfault.else
branch doesn't defineshowcase()
, so the later call should result in anUndefVarError
being thrown. (The earlier observation thaterror()
works is because that cases the function to throw an actual error and exit the function before the call following the if-else block is called.)I've tried out Julia v1.5's new
julia --bug-report=rr
tool — therr
dump was uploaded to https://s3.amazonaws.com/julialang-dumps/reports/2020-08-28T15-12-54-jmert.tar.zstJulia version:
(I had to switch to my Intel laptop since
rr
doesn't run on Ryzen, and I didn't realize I still had the beta installed on the laptop. I can reproduce with v1.5.1 if need be.)Test script:
The text was updated successfully, but these errors were encountered: