Skip to content

Conversation

@gliptic
Copy link
Contributor

@gliptic gliptic commented Mar 11, 2024

llama_grammar_init unnecessarily retains a pointer from the rules array even though it has been copied, making it necessary to keep rules alive after the call has returned (or segfault in my case...).

This fix simply uses a pointer to the copy instead.

@ggerganov ggerganov merged commit 5cdb371 into ggml-org:master Mar 11, 2024
@gliptic gliptic deleted the fix_pointer_to_parameter branch March 11, 2024 20:01
NeoZhangJianyu pushed a commit to NeoZhangJianyu/llama.cpp that referenced this pull request Mar 12, 2024
jordankanter pushed a commit to jordankanter/llama.cpp that referenced this pull request Mar 13, 2024
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