Skip to content

fix: crash in ANY graph INSERT with property strings >12 chars#630

Merged
adsharma merged 2 commits into
mainfrom
opentype_graph_crash
Jun 29, 2026
Merged

fix: crash in ANY graph INSERT with property strings >12 chars#630
adsharma merged 2 commits into
mainfrom
opentype_graph_crash

Conversation

@adsharma

Copy link
Copy Markdown
Contributor

Fixes: #628

adsharma added 2 commits June 28, 2026 11:29
When binding inserts against ANY graph tables (_nodes/_edges), the code
constructs a temporary ValueVector without passing a MemoryManager
(defaults to nullptr). For short strings (≤ SHORT_STR_LENGTH=12), the
string_t fits inline and the null MemoryManager is never reached. But
for longer strings — e.g. `{"local":true}` (14 chars) — the overflow
allocation path is taken, dereferencing the null pointer and causing
EXC_BAD_ACCESS in MemoryManager::mallocBuffer.

Fix: pass MemoryManager::Get(*clientContext) when constructing the
temp ValueVector in both bindInsertNode and bindInsertRel.
@adsharma adsharma changed the title Opentype graph crash fix: crash in ANY graph INSERT with property strings >12 chars Jun 28, 2026
@adsharma adsharma merged commit 139b43c into main Jun 29, 2026
4 checks passed
@adsharma adsharma deleted the opentype_graph_crash branch June 29, 2026 21: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.

Bug: nodejs hangs due to specific query

1 participant