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

Julia 1.2 crashes with try/catch invalid rational #33085

Closed
siroccal opened this issue Aug 26, 2019 · 3 comments
Closed

Julia 1.2 crashes with try/catch invalid rational #33085

siroccal opened this issue Aug 26, 2019 · 3 comments

Comments

@siroccal
Copy link

let
    for i = 1:2
        try 0//0 catch; end
    end
    if false; a = 0; end
    +a
end

or one-line let;for i=1:2;try 0//0 catch;end;end;if false;a=0;end;+a;end

This crashes with

Unreachable reached at 0x7f1cde7c33c3
signal (4): Illegal instruction
[...]
__libc_start_main at /lib64/libc.so.6 (unknown line)
unknown function (ip: 0x4015d4)

Removing or changing almost anything makes the bug disappear, including:

  • removing the let block (a function still crashes)
  • changing i=1:2 to i=1:1
  • changing 0//0 to 0//1 or 0/0 (but 0/(0//1) still crashes)
  • removing the try-catch
  • changing false to true
  • not assigning a in the if
  • not doing something with a after the if
Julia Version 1.2.0
Commit c6da87ff4b (2019-08-20 00:03 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: AMD Phenom(tm) II X4 955 Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, amdfam10)

I'm using the tarball downloaded from julialang.org.

@fredrikekre
Copy link
Member

Thanks for the report, and for the nicely reduced example. I think this is fixed by #32830 which is already applied to the 1.3 backport branch (#33073), and marked for backport to 1.0.5 (#33075) if someone makes the manual backport.

@mortenpi
Copy link
Contributor

I can confirm that the bug is fixed on the 1.2.1 backports branch (backports-release-1.2/03c9c72961), but still present on the 1.0.5 backports branch (backports-release-1.0/ec7c6f6187) at the moment.

@laborg
Copy link
Contributor

laborg commented Feb 18, 2022

Closing, because this was fixed a while ago and there won't be an update to 1.0 anymore.

@laborg laborg closed this as completed Feb 18, 2022
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

No branches or pull requests

4 participants