Skip to content

Commit a0b2248

Browse files
committed
fixed build errors ande
1 parent 513d4b3 commit a0b2248

4 files changed

Lines changed: 6 additions & 1 deletion

File tree

compile.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@echo off
2-
clang -o proxpl.exe -Iinclude -Isrc -D_CRT_SECURE_NO_WARNINGS -DPROX_STATIC -DDEBUG_SUBSTR -DDEBUG_PROPERTY_ACCESS ^
2+
clang -o proxpl.exe -Iinclude -Isrc -D_CRT_SECURE_NO_WARNINGS -DPROX_STATIC ^
33
src/main.c ^
44
src/compiler/lexer/scanner.c ^
55
src/compiler/parser/ast.c ^

proxpl.exp

57.6 KB
Binary file not shown.

proxpl.lib

95.1 KB
Binary file not shown.

src/runtime/vm.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ VM vm;
2929
static void resetStack(VM *pvm) {
3030
pvm->stackTop = pvm->stack;
3131
pvm->frameCount = 0;
32+
// CRITICAL FIX: Initialize stack to prevent reading uninitialized memory
33+
// Without this, NaN-boxed Values can have corrupted type tags from random bits
34+
for (int i = 0; i < STACK_MAX; i++) {
35+
pvm->stack[i] = NIL_VAL;
36+
}
3237
}
3338

3439
void initVM(VM *pvm) {

0 commit comments

Comments
 (0)