Skip to content

Fix double free for geologist sign - #1967

Open
Xellzul wants to merge 1 commit into
Return-To-The-Roots:masterfrom
Xellzul:Bugfixes
Open

Fix double free for geologist sign#1967
Xellzul wants to merge 1 commit into
Return-To-The-Roots:masterfrom
Xellzul:Bugfixes

Conversation

@Xellzul

@Xellzul Xellzul commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

A geologist replacing an old sign with a new one destroys and frees it immediately, leaving the kill list holding a dangling pointer and double-freeing it moments later.

Not sure if it impacts meaningfully replays.

@Flamefire

Copy link
Copy Markdown
Member

Can you explain a bit what happens here and why?

From quick inspection the existing code looked correct:

  • When Destroy is called the object is immediately removed. The event is removed so the code in HandleEvent doesn't trigger
  • When the event triggers the object is added to the kill list where destroy is called removing the object

So what exactly happens to lead to this bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants