ghc compiled program crashes with segfault when using -M and/or -c
When running my program with limited heap size (-H128m) and/or using the compacting procedure (-c) in garbage collection, the program crashes with the following message:
Segmentation fault/access violation in generated code
It seems that the segfault occurs the first time the garbage collector runs as the log file generated with -S contains the headline only.
The program runs fine without the -M and -c options.
This problem is critical from my point of view as I cannot control what kind of data the customer will supply to the algorithm and I would the prefer the algorithm (then deployed as a DLL) to gracefully report a heap overflow instead of eating all the customer's terminal server's memory.
Let me know how I can help to fix this bug.
As the source code is proprietary, I cannot attach it here.