Commit 4117fd9
Fix TCC Windows crash: replace FnDecl compound literals with memdup
The large compound literal for `&ast.FnDecl{...*node, generic_names: ...}`
generated ~1KB of stack-allocated struct initialization with 50+ field
assignments including bitfields, which TCC on Windows x64 miscompiles
causing a runtime crash (invalid memory access at checker/fn.v call_expr).
Replace with memdup + direct field write to avoid the problematic compound
literal. Also fix cube.js.v formatting for MSVC CI.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 7b8aa4d commit 4117fd9
2 files changed
Lines changed: 10 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
339 | | - | |
| 339 | + | |
| 340 | + | |
340 | 341 | | |
341 | 342 | | |
342 | 343 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
745 | 745 | | |
746 | 746 | | |
747 | 747 | | |
748 | | - | |
749 | | - | |
750 | | - | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
751 | 752 | | |
752 | 753 | | |
753 | 754 | | |
| |||
3446 | 3447 | | |
3447 | 3448 | | |
3448 | 3449 | | |
3449 | | - | |
3450 | | - | |
3451 | | - | |
| 3450 | + | |
| 3451 | + | |
| 3452 | + | |
| 3453 | + | |
3452 | 3454 | | |
3453 | 3455 | | |
3454 | 3456 | | |
| |||
0 commit comments