Repository navigation
speculative-simple, speculative: fix init error handling causing crash - #31996
Open
JamieBordoni wants to merge 1 commit into
Open
JamieBordoni wants to merge 1 commit into
JamieBordoni wants to merge 1 commit into
Conversation
Contributor
Author
|
Closed as new contributors are limited to 1 pr and i think #32000 is more important. |
Contributor
Author
|
reopened now that #32000 has merged. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Fixed issue where running speculative examples when the model or context fails to initialize would print an error but still crash with exit code 139. Process now exits cleanly with error code 1.
Additional information
Reproducer:
Crashes with:
After:
When model initialization function returns null llama speculative would carry on using the null pointers without first checking if model and ctx were null causing program to crash.
Also tested with llama-speculative-simple with the same large -c reproducer and llama-speculative with -md pointing to a file which doesn't exist. Both segfaulted before now exits with error 1. Normal runs still generate text with exit 0.
Requirements