Closed
Description
I've heard this issue might have been raised before, but I couldn't find it ;)
> .\julia.exe --depwarn=no --inline=no -O1
| | |_| | | | (_| | | Version 0.7.0-beta2.12 (2018-07-15 15:57 UTC)
_/ |\__'_|_|_|\__'_| | Commit a878341b2b* (0 days old master)
|__/ | x86_64-w64-mingw32
julia> GPUArrays
julia> fill(JLArray{Float32}, Float32, (4,4))
ERROR: StackOverflowError:
julia>
With gdb:
Starting program: C:\Users\sdani\AppData\Local\Julia-0.7.0-beta2\bin\julia.exe "--depwarn=no" "--inline=no" -O1
| | |_| | | | (_| | | Version 0.7.0-beta2.12 (2018-07-15 15:57 UTC)
_/ |\__'_|_|_|\__'_| | Commit a878341b2b* (0 days old master)
|__/ | x86_64-w64-mingw32
julia> [New Thread 244.0x4174]
julia> using GPUArrays
julia> fill(JLArray{Float32}, Float32, (4,4))
Program received signal SIGSEGV, Segmentation fault.
0x00007ff8817e521a in ntdll!RtlSizeHeap () from C:\WINDOWS\SYSTEM32\ntdll.dll
(gdb) backtrace
#0 0x00007ff8817e521a in ntdll!RtlSizeHeap () from C:\WINDOWS\SYSTEM32\ntdll.dll
#1 0x00007ff8817e2b55 in ntdll!RtlAllocateHeap () from C:\WINDOWS\SYSTEM32\ntdll.dll
#2 0x00007ff8818cfade in ntdll!RtlpNtSetValueKey () from C:\WINDOWS\SYSTEM32\ntdll.dll
#3 0x00007ff881878f2a in ntdll!memset () from C:\WINDOWS\SYSTEM32\ntdll.dll
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb)
It might be related to broadcasting + inference, since when I try walking down the whole call tree manually, everything just works.
This is what gets called:
julia> x = similar(JLArray, Float32, (4,4))
4×4 JLArray{Float32,2}:
...
julia> @code_warntype fill!(x, 0f0)
Body::Union{}
13 1 ─ %1 = :(Base.Broadcast.materialize!)::Core.Compiler.Const(Base.Broadcast.materialize!, false) │
│ %2 = :(Base.Broadcast.broadcasted)::Core.Compiler.Const(Base.Broadcast.broadcasted, false) │
│ %3 = :($(Expr(:static_parameter, 1)))(%%val)::Float32 │
│ %4 = %2(GPUArrays.identity, %3)::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{0},Nothing,typeof(identity),Tuple{Float32}}
│ %1(%%A, %4) │
└── unreachable │
2 ─ unreachable │
Metadata
Metadata
Assignees
Labels
No labels