Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- prevent appearance of dangling pointers in corpse queue
A dangling pointer in corpse queue may appear if actor is added to the queue when GC is in propagation state. Enqueued corpse actor remains white, and if it’s destroyed and garbage collected before dequeue, a dangling pointer will be accessed during its removal from the queue. In console, do `summon CorpseSpawner` and `gc now` with the following script loaded. Without a write barrier, it will crash in two seconds. ``` class TestCorpse : Actor { States { Spawn: POSS U 1 A_Die; Death: POSS U 1 A_QueueCorpse; Stop; } } class CorpseSpawner : Actor { override void Tick() { A_SpawnItem("TestCorpse"); } } ``` https://forum.zdoom.org/viewtopic.php?t=69842
- Loading branch information