Commit 6dbddac
Ralf Waldukat
CRITICAL FIX: Add missing parameters to llama_params_fit
Found by Gemini-3-Flash deep review.
The llama_params_fit signature was missing 3 parameters (margin, n_ctx_min, log_level)
causing guaranteed stack corruption if the function was ever called.
Before (WRONG - 6 parameters):
- path_model, mparams, cparams, tensor_split, tensor_buft_overrides, n_buft_overrides
After (CORRECT - 8 parameters per llama.h:480-488):
- path_model, mparams, cparams, tensor_split, tensor_buft_overrides, margin, n_ctx_min, log_level
Impact: Stack corruption/segfault prevented. This function is rarely used (memory fitting),
so the bug was latent but critical.1 parent d53fc2e commit 6dbddac
1 file changed
+14
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1409 | 1409 | | |
1410 | 1410 | | |
1411 | 1411 | | |
1412 | | - | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
1413 | 1415 | | |
1414 | 1416 | | |
1415 | 1417 | | |
| |||
1418 | 1420 | | |
1419 | 1421 | | |
1420 | 1422 | | |
1421 | | - | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
1422 | 1426 | | |
1423 | 1427 | | |
1424 | 1428 | | |
| |||
1428 | 1432 | | |
1429 | 1433 | | |
1430 | 1434 | | |
1431 | | - | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
1432 | 1438 | | |
1433 | 1439 | | |
1434 | 1440 | | |
1435 | 1441 | | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
1436 | 1447 | | |
1437 | 1448 | | |
1438 | 1449 | | |
| |||
0 commit comments