honestly the more i look at this adelie fork of libucontext, the more it pisses me off. they made one change to it, which is *wrong* and then monetized it.
at any rate, libucontext 0.10 will be released soon to supercede their fork. don't use their fork, it is completely broken on x86.
Show thread

Our libucontext repository is not broken on x86; it is fixed on x86.

<awilfox> the x86 port always stores the link pointer at *sp++, before the args so it is called with the link pointer as the first argument: #8 f1 (a=1448439872, b=1, c=2, d=3, e=4, f=5, g=6, h=7, i=8, j=9) at test_libucontext.c:24
<awilfox> now, fixing it, so it stores exactly the same as the 64-bit version, fixes *that* issue, but then dies when swapping contexts twice:
<awilfox> because it jumped to the value of the link pointer, that is, it jumped to *the ucontext variable* instead of the value of EIP *inside* the ucontext variable
<Emily> adelie/libucontext: A. Wilcox pushed a commit to the master branch:
<Emily> aaeb73e ( code.foxkit.us/adelie/libucont ) by A. Wilcox: x86: Write link pointer at correct stack offset
<awilfox> fixed it!! tagged 0.9.0

In addition to regular testing by way of being used for GCC Go, we also have CI for 32-bit and 64-bit x86 that ensure runtime correctness: travis-ci.org/AdelieLinux/libu

Sign in to participate in the conversation
Interlinked MST3K

this is mst3k