Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SWT cannot yet pass the yklua test suite #1528

Open
ltratt opened this issue Dec 24, 2024 · 0 comments
Open

SWT cannot yet pass the yklua test suite #1528

ltratt opened this issue Dec 24, 2024 · 0 comments
Assignees

Comments

@ltratt
Copy link
Contributor

ltratt commented Dec 24, 2024

I thought SWT was capable of running -- though rather slowly! -- all the things that HWT can. But on a fresh clone on a debug build if I try running yklua's test suite I get:

$ cd yklua/tests
$ YKD_OPT=0 YKD_SERIALISE_COMPILATION=1 ../src/lua -e"_U=true" all.lua
...
***** FILE 'cstack.lua'*****
testing stack overflow detection
testing stack overflow in message handling
.final count:   250037
testing recursion inside pattern matching
testing stack-overflow in recursive 'gsub'
final count:    197
testing stack-overflow in recursive 'gsub' with metatables
final count:    99
testing limits in coroutines inside deep calls
final count:    196
chain of 'coroutine.close'
thread '<unnamed>' panicked at ykrt/src/compile/jitc_yk/codegen/x64/mod.rs:2012:30:
ConstPtr(0)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at ykrt/src/mt.rs:229:39:
called `Result::unwrap()` on an `Err` value: Any { .. }
fatal runtime error: failed to initiate panic, error 5
Aborted

This is immediately a bit fishy, because I would expect swt to create identical traces to hwt, but here we seem to be encountering a null pointer. However, just in case, I implemented support for constant pointers in this experimental branch. With YKD_OPT=0 this no longer panics but corrupts yklua's state leading to a Lua level backtrace:

...
***** FILE 'cstack.lua'*****
testing stack overflow detection
testing stack overflow in message handling
.final count:   250037
testing recursion inside pattern matching
testing stack-overflow in recursive 'gsub'
final count:    197
testing stack-overflow in recursive 'gsub' with metatables
final count:    99
testing limits in coroutines inside deep calls
final count:    196
chain of 'coroutine.close'
../src/lua: cstack.lua:105: attempt to call a boolean value (field 'resume')
stack traceback:
        cstack.lua:105: in main chunk
        (...tail calls...)
        all.lua:181: in main chunk
        [C]: in ?

Can it be that we never solved the unmappable problem (see e.g. #1095 or #980)? Or is there some other problem in swt? Either way, we should almost certainly fix this, because the longer we can't run swt on our test suites, the more likely that deeper harder-to-fix problems are going to creep in.

CC @ptersilie.

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

No branches or pull requests

2 participants