Skip to content

Fix critical crash: 'free(): invalid pointer' in CoreAttention#111

Closed
vieenrose wants to merge 1 commit intofoldl:masterfrom
vieenrose:fix/core-attention-memory-safety
Closed

Fix critical crash: 'free(): invalid pointer' in CoreAttention#111
vieenrose wants to merge 1 commit intofoldl:masterfrom
vieenrose:fix/core-attention-memory-safety

Conversation

@vieenrose
Copy link

This PR fixes a critical memory safety issue in src/layers.h where a unique_ptr was initialized with a stack address (&def_pos_helper). This caused a deterministic crash (free(): invalid pointer) during object destruction, affecting all models using this layer configuration.

@vieenrose
Copy link
Author

Closing for further assessment.

@vieenrose vieenrose closed this Feb 13, 2026
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