Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Passing exception address by `longjmp` #30
In chapter SjLj exception handling, I noticed that we passed an address of pointer by
%5 = ptrtoint %Exception* %3 to i32 call void @longjmp(%jmp_buf* %throw, i32 %5)
I am to blame :) I did the original sample for 32-bit architectures. The idea is to pass the pointer to the exception instance up the call stack, but I am not sure how to do this with 64-bit pointers. I'd prefer if we can somehow pass a pointer to the exception instance, but if this is impossible, I guess we'll have to resort to an error code. After all, it is just a sample.
As far as I can see,