Closed glebnovodran closed 1 year ago
I will put some time into this asap to get to the bottom
On Mon, May 29, 2023 at 2:04 PM Glib Novodran @.***> wrote:
Hello,
A reduced test case for getting it crashed is:
function faulty_func() { t = 1.0; x = t 4.0; // <-- any arithmetic operation involving a literal // can be x = 1.0 + 2.0; z = x t; // <-- any binary operation on two variables return z; }
The function should contain an arithmetic operation involving a numeric literal followed by a binary arithmetic operation on two variables.
Debugging it, I figured out that this line z = x * t; produces WR_ERR_bad_expression when the expression is being resolved. It happens here https://github.com/jingoro2112/wrench/blob/3838502c04fba683b4c0741bf370b8ca46615e19/src/wrench.cpp#L5135 . resolves != startedWith for some reason.
Ultimately, it crashes at the end of the function execution.
— Reply to this email directly, view it on GitHub https://github.com/jingoro2112/wrench/issues/9, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALIKA3NLZ34UENOSRARJIDXITQJPANCNFSM6AAAAAAYTBIUWY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
This turned out to be an unclean state in the keyhole optimizer, which has been fixed and regressed.
Thank you so much for taking the time to report it!
Glad to help.
Hello,
A reduced test case for getting it crashed is:
The function should contain an arithmetic operation involving a numeric literal followed by a binary arithmetic operation on two variables.
Debugging it, I figured out that this line
z = x * t;
produces WR_ERR_bad_expression when the expression is being resolved. It happens here .resolves != startedWith
for some reason.Ultimately, it crashes at the end of the function execution.