Commit graph

3 commits

Author SHA1 Message Date
Christoph Oelckers
d1caf3a471 - made TObjPtr as trivial as possible.
Mainly to avoid problems with Raze, but eliminating this constructor lets us catch erroneous local definitions via 'auto', which can cause major problems if left undetected.
2022-06-06 15:19:31 +02:00
alexey.lysiuk
a9ad3d1fc3 - 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
2021-06-30 10:19:08 +03:00
Christoph Oelckers
9045615a7a - renamed g_shared folder to playsim. 2019-07-14 13:24:18 +02:00
Renamed from src/g_shared/a_action.cpp (Browse further)