-
Notifications
You must be signed in to change notification settings - Fork 7
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
Comments
I am not sure if this is still (or ever was!) an issue or not. @Pavel-Durov did you replicate? |
I haven't tried replicating it, but I can give it a go :) |
Thanks! |
Yes I was able to reproduce it as well yk build (commit 94e9c56) YKB_TRACER=swt cargo build yklua build: YK_BUILD_TYPE=debug YKB_TRACER=swt make -j "$(nproc)" yklua test:
Output:
|
I suspect it's worth running shrinkray on |
I looked into the changes since the last time I ran the yklua tests. We might not have tested the 5.6.4 import cause previous 5.4.4 import works with current yk. The diff do -- bug since 5.4.0
local count = 0
print("chain of 'coroutine.close'")
-- create N coroutines forming a list so that each one, when closed,
-- closes the previous one. (With a large enough N, previous Lua
-- versions crash in this test.)
local coro = false
for i = 1, 1000 do
local previous = coro
coro = coroutine.create(function()
local cc <close> = setmetatable({}, {__close=function()
count = count + 1
if previous then
assert(coroutine.close(previous))
end
end})
coroutine.yield() -- leaves 'cc' pending to be closed
end)
assert(coroutine.resume(coro)) -- start it and run until it yields
end
local st, msg = coroutine.close(coro)
assert(not st and string.find(msg, "C stack overflow"))
print("final count: ", count)
end |
If we |
When I run shrinkray on it using this script. It completes:
but it produces lua code with infinate loop: do for A = 0, 1 / 0 do
A = coroutine.create(function() coroutine.yield() end)
assert(coroutine.resume(A))
end end that runs forever when I run at as: RUST_BACKTRACE=full YKD_OPT=0 YKD_SERIALISE_COMPILATION=1 ../src/lua ./cstack.shrinked.lua I'm sure that I'm doing something wrong, just not sure what is it... 🤔 |
Yes, your reduction script probably isn't looking for the right error. It does take a bit of getting used to. |
It looks like this is the minimal reduction result:
|
Ah, actually, I think the |
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: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 longerpanic
s but corrupts yklua's state leading to a Lua level backtrace: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.
The text was updated successfully, but these errors were encountered: