Opened 10 months ago

Closed 9 months ago

#1344 closed defect (fixed)

Panic on "invalid encoded numeric literal" error on 64-bit Windows

Reported by: evhan Owned by:
Priority: major Milestone: 4.13.0
Component: unknown Version: 4.11.0
Keywords: windows, msys, mingw Cc:
Estimated difficulty: medium

Description (last modified by evhan)

64-bit builds on Windows (MinGW/MSYS) fail on the lolevel tests with the error "invalid encoded numeric literal".

MSYS2:

"C:/MSYS264/home/evhan/chicken-4.12.0rc1-mingw-msys-x86-64/tests/../chicken "lolevel-tests.scm" -output-file "a.c" -types ../types.db -ignore-repository -verbose -include-path C:/MSYS264/home/evhan/chicken-4.12.0rc1-mingw-msys-x86-64/tests/.. -specialize"
""gcc" "a.c" -o "a.o" -c  -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -IC:/MSYS264/home/evhan/chicken-4.12.0rc1-mingw-msys-x86-64/tests/.. -IC:/MSYS264/usr/local/chicken-4.12.0rc1-mingw-msys-x86-64/include/chicken"
rm a.c
""gcc" "a.o" -o "a.out" -Wl,--enable-auto-import -LC:/MSYS264/home/evhan/chicken-4.12.0rc1-mingw-msys-x86-64/tests/.. -LC:/MSYS264/usr/local/chicken-4.12.0rc1-mingw-msys-x86-64/lib -lchicken -lm -lws2_32"
rm a.o
[panic] invalid encoded numeric literal - execution terminated

make: *** [rules.make:663: check] Error 1

And MinGW:

""gcc" "a.c" -o "a.o" -c  -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -IC:\\Users\\evhan\\Downloads\\chicken-4.12.0rc1-mingw-x86-64\\tests/.. -IC:/mingw-w64/usr/local/chicken-4.12.0rc1-mingw-x86-64/include/chicken"
rm a.c
""gcc" "a.o" -o "a.out" -Wl,--enable-auto-import -LC:\Users\evhan\Downloads\chicken-4.12.0rc1-mingw-x86-64\tests/.. -LC:/mingw-w64/usr/local/chicken-4.12.0rc1-mingw-x86-64/lib -lchicken -lm -lws2_32"
rm a.o
[panic] invalid encoded numeric literal - execution terminated

.\rules.make:665: recipe for target 'check' failed
mingw32-make: *** [check] Error 1

This was observed on an x86-64 Windows 7 VM. Cygwin and 32-bit MinGW builds are unaffected.

Change History (5)

comment:1 Changed 10 months ago by evhan

  • Description modified (diff)

comment:2 Changed 10 months ago by evhan

  • Milestone changed from someday to 4.13.0

This is not new in 4.12.0rc1 (4.11.0 exhibits the same behaviour), so I don't think it should block the release.

comment:3 Changed 9 months ago by kooda

I’ve been investigating this issue and big-fixnum literals seem to be wrongly generated indeed.

A “f” character is appended to all of them.

The code that generates these literals is in c-backend.scm line 1420.

(string-append "\x55" (number->string lit) "\x00")

What I don’t understand is that number->string works fine in csi!

comment:4 Changed 9 months ago by LemonBoy

I've finally found some time to solve this riddle.

comment:5 Changed 9 months ago by kooda

  • Resolution set to fixed
  • Status changed from new to closed

Fixed by 686545750874d31fac022e0f9d5be75b0edd2a77

Thanks a lot!

Note: See TracTickets for help on using tickets.