ark-lang / ark

A compiled systems programming language written in Go using the LLVM framework
https://ark-lang.github.io/
MIT License
677 stars 47 forks source link

Struct passing bug #700

Closed kiljacken closed 8 years ago

kiljacken commented 8 years ago

In tests/enum_union.ark, if one where to pass Tree by value instead of as opposed to by pointer, the test will result in a segfault. Uncommenting certain combinations of the debug printfs makes it not segfault.

I believe we're running into a weird combination of odd LLVM struct passing behavior triggering an alignment issue, as the segfault is the result of the upper half of the right pointer being cut off / set to zero.

MovingtoMars commented 8 years ago

I'm unable to reproduce.