Closed joshwhieb closed 7 months ago
@AndrewGoodrich and @pah: Could you maybe have a look whether it is still relevant wrt. to recent updates in the PoC implementation?
This one is superseded by the implementation in SystemC 3.0.
I haven't seen this issue for a while as i've changed cluster environments it happens only in certain setups. If it's resolved by the next major systemC version implementation then we can close this out as a duplicate/invalid.
https://forums.accellera.org/topic/6413-likely-memory-corruption-by-systemc/
Change the quick threads stack allocate/deallocate implementation to use mmap/munmap for the qt stack manually applied as Guillaume Audeon's git patch file from the forum doesn't apply cleanly. Guillaume might know the in depth details with how this addresses the seg fault and this also resolves my issues with assert + seg faults. I believe the linked forum is correct that using mprotect on malloc memory isn't supported via the documentation. If we use mmap we can also set the mprotect flags there.
Please feel free to pick this PR apart but I think we need to come to a resolution of the linked forum and get a new systemC tag out (2.3.5?) to help others avoid this. This error when encountered is a major hinderance for systemC usage when you find the right environment combination to run into it.