mcontext struct has differently-named members in OS X 10.4
mcontext struct, used by Ruby in
vm_dump.c, has a different structure in OS X 10.4 than it does in later versions.
In OS X 10.5 and later, its members' names all start with a double underscore (
__); in 10.4, they don't. Similarly, the
ss struct's members all begin with
__, for example
__esp, while in 10.4 they don't, for example
vm_dump.c is missing an
#include <ucontext.h> in order to access the
mcontext struct definition.
signal.c is here: https://github.com/ruby/ruby/blob/trunk/signal.c#L790-L794
vm_dump.c is here: https://github.com/ruby/ruby/blob/trunk/vm_dump.c#L460-L480 https://github.com/ruby/ruby/blob/trunk/vm_dump.c#L825
I tested using Ruby 2.2.3p173 and Ruby 2.4; the sections of these files in trunk are unchanged and still have the bug in question. I'm building for i386.