Closed Spivoxity closed 5 years ago
Confirmed on Linux/i386.
For diagnosis, see the attached test case tKleinert.m.
Workaround: make the array parameter to Generate a VAR parameter to remove the need to allocate space for a variable-sized copy in the stack frame.
[See tKleinert.m]
Fixed in 3.0.6
Christian Kleinert reported as follows.
The attached files compiled with obc version 3.0.5 (obc HeapProc.mod TestHeapProc.mod) on macOS 10.12.5 produce a Segmentation Fault at the commented lines in HeapProc.mod.
When storing the index for writing the array in a temporary variable it works.
(using .mod instead of .m only to satisfy the Visual Studio Code plugin)