Skip to content

Fixes issue: #3924#3929

Open
michaelsam94 wants to merge 1 commit into
ggml-org:masterfrom
michaelsam94:codex/fix-invalid-ftype-load
Open

Fixes issue: #3924#3929
michaelsam94 wants to merge 1 commit into
ggml-org:masterfrom
michaelsam94:codex/fix-invalid-ftype-load

Conversation

@michaelsam94

Copy link
Copy Markdown

Problem: invalid model ftype values reached ggml_ftype_to_ggml_type() and triggered GGML_ASSERT, aborting instead of returning a load error.

Change: validate normalized hparams.ftype in whisper_model_load() before calling ggml_ftype_to_ggml_type().

Test: added test-model-load, which writes a minimal invalid model header with ftype = 5 and expects whisper_init_from_file_with_params() to fail cleanly.

Verification I ran: git diff --check; direct compiled and ran test-model-load.

CMake/CTest note: not run because cmake was unavailable in this environment.

Problem: invalid model ftype values reached ggml_ftype_to_ggml_type() and triggered GGML_ASSERT, aborting instead of returning a load error.

Change: validate normalized hparams.ftype in whisper_model_load() before calling ggml_ftype_to_ggml_type().

Test: added test-model-load, which writes a minimal invalid model header with ftype = 5 and expects whisper_init_from_file_with_params() to fail cleanly.

Verification I ran: git diff --check; direct compiled and ran test-model-load.

CMake/CTest note: not run because cmake was unavailable in this environment.
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