Skip to content

null-check the entry in ImportBlackboardFromJSON after createEntry - #1284

Merged
facontidavide merged 2 commits into
masterfrom
fix/import-bb-json-null
Nov 7, 2026
Merged

facontidavide merged 2 commits into
masterfrom
fix/import-bb-json-null

Conversation

@facontidavide

Copy link
Copy Markdown
Collaborator

ImportBlackboardFromJSON() calls createEntry(), then getEntry(), and dereferences the result. A concurrent unset() of the same key from another thread in between makes getEntry() return nullptr, and the import crashes. Now that key is skipped. This was the only unchecked instance of that pattern; SetBlackboardNode and the script assignment already check.

There's no test, because the race window is too narrow to reproduce deterministically. No ABI change; the edit is .cpp-only.

🤖 Generated with Claude Code

facontidavide and others added 2 commits November 7, 2026 18:10
After createEntry() the entry was re-fetched with getEntry() and dereferenced
unchecked; a concurrent Blackboard::unset() from another thread in that window
returned nullptr and crashed. Skip that key instead.

No test: the window is a few instructions wide, so a deterministic reproduction
is not possible. The same createEntry->getEntry->deref pattern elsewhere
(SetBlackboardNode, script assignment operator) is already null-checked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Nov 7, 2026

Copy link
Copy Markdown

@facontidavide
facontidavide merged commit 24e7755 into master Nov 7, 2026
18 checks passed
@facontidavide
facontidavide deleted the fix/import-bb-json-null branch November 7, 2026 18:36
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.

1 participant