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

I can crash Julia 1.5 and 1.6 reliably with this code #37294

Closed
xiaodaigh opened this issue Aug 31, 2020 · 1 comment
Closed

I can crash Julia 1.5 and 1.6 reliably with this code #37294

xiaodaigh opened this issue Aug 31, 2020 · 1 comment

Comments

@xiaodaigh
Copy link

This piece of code if run in the REPL can reliably crash Julia on both Windows and Linux (WSL2 Ubuntu 18.04) on both Julia v1.5 and v1.6

import Base.*
a::Int * b::Int = a + b
Error message ``` signal (11): Segmentation fault in expression starting at none:0 jl_f_tuple at /buildworker/worker/package_linux64/build/src/builtins.c:721 iterate at ./essentials.jl:601 [inlined] iterate at ./essentials.jl:601 _jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2231 [inlined] jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2398 to_tuple_type at ./reflection.jl:775 methods at ./reflection.jl:902 methods at ./reflection.jl:922 [inlined] methods at ./reflection.jl:922 _jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2231 [inlined] jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2398 show at ./show.jl:38 unknown function (ip: 0x7ff3e8a6e205) _jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2231 [inlined] jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2398 display at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:214 display at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:218 _jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2231 [inlined] jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2398 display at ./multimedia.jl:328 _jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2214 [inlined] jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2398 jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1690 [inlined] do_apply at /buildworker/worker/package_linux64/build/src/builtins.c:655 jl_f__apply_latest at /buildworker/worker/package_linux64/build/src/builtins.c:705 #invokelatest#1 at ./essentials.jl:710 [inlined] invokelatest at ./essentials.jl:709 [inlined] print_response at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:238 print_response at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:223 do_respond at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:822 jfptr_do_respond_60634.clone_1 at /home/xiaodai/julia-1.5.0/lib/julia/sys.so (unknown line) _jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2214 [inlined] jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2398 jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1690 [inlined] do_apply at /buildworker/worker/package_linux64/build/src/builtins.c:655 jl_f__apply_latest at /buildworker/worker/package_linux64/build/src/builtins.c:705 #invokelatest#1 at ./essentials.jl:710 [inlined] invokelatest at ./essentials.jl:709 [inlined] run_interface at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/REPL/src/LineEdit.jl:2355 jfptr_run_interface_59827.clone_1 at /home/xiaodai/julia-1.5.0/lib/julia/sys.so (unknown line) _jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2214 [inlined] jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2398 run_frontend at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:1143 #38 at ./task.jl:356 jfptr_YY.38_60720.clone_1 at /home/xiaodai/julia-1.5.0/lib/julia/sys.so (unknown line) _jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2214 [inlined] jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2398 jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1690 [inlined] start_task at /buildworker/worker/package_linux64/build/src/task.c:707 unknown function (ip: (nil)) Allocations: 3616394 (Pool: 3615009; Big: 1385); GC: 4 Segmentation fault ```
`versioninfo()`
Julia Version 1.5.1
Commit 697e782ab8 (2020-08-25 20:08 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, skylake)
Environment:
  JULIA_EDITOR = sublime_text
  JULIA_NUM_THREADS = 6
  JULIA_PKG_DEVDIR = c:/git/
@KristofferC
Copy link
Member

KristofferC commented Aug 31, 2020

Breaking methods used within Julia (type piracy) can indeed crash the system. This is expected.

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

2 participants