ponyc
ponyc copied to clipboard
Segmentation fault on array copy
trafficstars
class Double
let _a: Array[U8 val] = []
let _b: Array[U8 val] = []
new create(a: Array[U8 val] val, b: Array[U8 val] val) =>
for byte in a.values() do
_a.push(byte)
end
for byte in b.values() do
_b.push(byte)
end
actor Main
var _d: (Double | None) = None
new create(env: Env) =>
let a: Array[U8 val] val = []
_d = Double(a, a)
Linux (x86_64 Linux 4.19.15_1)
$ ponyc --version:
0.25.0 [release]
compiled with: llvm 6.0.1 -- cc (GCC) 7.3.0
Defaults: pic=true ssl=openssl_0.9.0
$ ponyc:
Building builtin -> /usr/lib/pony/0.25.0/packages/builtin
Building . -> /home/eevv/projects/pony/bug
Generating
Reachability
Selector painting
Data prototypes
Data types
Function prototypes
Functions
Descriptors
Optimising
Stack dump:
0. Running pass 'Function Pass Manager' on module 'bug'.
1. Running pass 'Move heap allocations to the stack' on function '@Main_Dispatch'
Segmentation fault
I can confirm this causes the same error for me using Ponyc 0.25.0 with LLVM 3.9.1 on MacOS 10.11.6
Since this is a failure in the heap to stack area that I'm currently looking at these past few days, I can take responsibility for next triaging steps on this one.
This is still an issue as of 0.37.0
Still an issue as of 0.46.0