On 11-06-22 2:08 PM, Eric Holk wrote:
Thanks, Rafael! I'm using revision 133533, so your fix should be in
there.
We aren't exactly using setjmp, instead we're using some hand-written
assembly that performs basically the same task. I'm guessing this is
why you fix didn't catch this issue.
Is there an attribute or annotation I can put on my function that
says "never use tail call elimination on calls to this function?" If
so, that might be a better way to fix it. Writing the whole swap
context function in assembly would probably work as well...
What is the problem that doing tail calls is causing? With setjmp the
problem is that the called function will corrupt the stack for when
longjmp is called. If the problem in here is that we are doing something
like
a = get_state();
yield();
with yield being tail called, maybe we can combine it in a
save_state_and_yield?
-Eric
Cheers,
Rafael
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev