Last active
March 10, 2020 21:25
-
-
Save musm/eaf154e54cd3f75331439965ef809208 to your computer and use it in GitHub Desktop.
Break Julia for fun (segfault/stackoverflows/etc.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# credits: @TotalVerb, @oxinabox, @musm @mbauman @quinnj | |
julia --compile=no --precompiled=no | |
(x->@inbounds(x+=[0][x])+x)(9^9^9) | |
[@inbounds([][x])for x=9^9^9] | |
run(`1`) | |
ccall(:j0,Any,()) | |
f(x,y) = f(x,y); f(1,1) | |
f()=f();f() | |
(f()=f())() | |
Libc.free(Ptr{1}(1)) | |
cfunction(produce,Int,Int) | |
ccall(:fma,Any,()) | |
addprocs(1); | |
remotecall_fetch(()->SharedArray(Int,2), 2) | |
julia> current_task().state=:a | |
julia> 2 | |
julia> Base.:(+)(x::Int, y::Int) = time_ns() % 1000 == 0 ? x : Base.add_int(x, y) | |
julia> unsafe_load(convert(Ptr{Complex{Float64}}, C_NULL)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment