[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Lua 5.4.4 (rc1) now available
- From: David Sicilia <dpsicilia@...>
- Date: Tue, 23 Nov 2021 13:42:33 -0500
Ok yes I see the changes to luaE_resetthread and that explains it, in particular the removal of this line:
- L->status = cast_byte(status);
My tests pass again when I reinstate that line. If you need any more info from me let me know, but it sounds like we understand it now.
I guess this is a good change to make, since it seems strange that a thread would retain the error state after reset. That said, I wonder if users are relying on it to detect errors in threads, so I think perhaps at least it should be mentioned in the release notes as a change in behavior resulting from a bug fix.
> Hi, I am seeing a regression (or change of behavior) related to thread
> error states.
> I have a test suite for the Lua API that I maintain as part of my project,
> and I downloaded Lua 5.4.4 (rc1) and ran it through the test suite and I am
> seeing consistent regressions with respect to thread error states not being
> set in threads after an error. Has anything changed in that department?
> Essentially, all of my tests that expect "a thread will be in an error
> status after throwing an uncaught error" are failing, meaning that the
> lua_status of such threads is not being set to the error status after an
> uncaught error. If you like, I can investigate further and try to find a
> minimal reproducer, if you don't think this is expected.
For sure there was a change there. What we need to check is which
behavior is "correct", the new one or the old one.
In particular, now, when we call lua_resetthread, its status is set
to Ok again, while previously it remained unchanged.