Segfault with makeStableName
|Reported by:||robertce||Owned by:|
|Keywords:||Cc:||tmcdonell@…, chak@…, erkokl@…|
|Type of failure:||None/Unknown||Test Case:|
|Related Tickets:||Differential Revisions:|
Calling makeStableName on the same object many times causes a segfault. The following triggers this behaviour on both OSX and Linux-x86_64, provided it is compiled (it doesn't seem to occur if the call to makeStableName is interpreted).
module Main where import Control.Monad import System.Mem.StableName main :: IO () main = replicateM_ 100000 (makeStableName foo) foo :: Int foo = 1
It seems to happen largely at random. The 100000 calls to makeStableName in the above example essentially guarantee its occurrence, but I have observed it happen with far fewer.
The reason this bug was discovered is it is causing frequent failures in Accelerate on 7.8.2. See https://github.com/AccelerateHS/accelerate/issues/162. In that case it seems to be causing more strange closure type errors than segfaults, but I assume it is the same root cause.
Change History (23)
comment:8 Changed 10 months ago by thoughtpolice
- Milestone set to 7.8.3
- Priority changed from high to highest
- Status changed from new to patch