Skip to content

Fix uninitialized groupcount causing intermittent segfaults#17

Open
DLehenbauer wants to merge 1 commit into
mist64:masterfrom
DLehenbauer:fix/segfault
Open

Fix uninitialized groupcount causing intermittent segfaults#17
DLehenbauer wants to merge 1 commit into
mist64:masterfrom
DLehenbauer:fix/segfault

Conversation

@DLehenbauer
Copy link
Copy Markdown

@DLehenbauer DLehenbauer commented May 25, 2026

Initialize state->groupcount to 0 in setupNodesAndTransistors().

group_clear() reads groupcount before any group_add() on the first recalcNode() pass. An uninitialized value caused intermittent heap-buffer-overflows that surfaced as random SIGSEGV / double-free aborts at startup (confirmed with AddressSanitizer).

Initialize state->groupcount to 0 in setupNodesAndTransistors().
group_clear() reads groupcount before any group_add() on the first
recalcNode() pass, and an uninitialized value caused intermittent
heap-buffer-overflows that surfaced as random SIGSEGV / double-free
aborts at startup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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