[erlang-patches] OS X fixes (HiPE, ddll unload)

Mikael Pettersson mikpe@REDACTED
Wed Sep 10 14:07:42 CEST 2008


Geoff Cant writes:
 > * http://github.com/mfoemmel/erlang-otp/commit/8eb2f8c0b19bec023b8d1e8446b58c30b53c3c44
 > 
 > Since OS X 10.5.3 it hasn't been possible to compile Erlang/OTP with
 > hipe enabled due to problems with hipe_signal_init dumping core with a
 > SIGBUS while trying to patch sigaction
 > (http://www.erlang.org/pipermail/erlang-bugs/2008-May/000813.html). The
 > cause of this appears to be mach_override causing a SIGBUS for reasons I
 > don't understand.
 > 
 > In the patch I've altered the hipe_signal_init code to use the same
 > _sigaction wrapping mechanism as linux and solaris (saving the old
 > _sigaction via dlsym(RTLD_NEXT, "sigaction") and then overwriting that
 > address with a pointer to hipe's my_sigaction wrapper). As far as I can
 > tell, this should work the same way as other platforms and removes the
 > dependency on mach_override.
 > 
 > As this is my first foray into the guts of the emulator, I don't know
 > how reliable these patches are. From my own testing, crypto (and
 > crypto_drv) seemed to work fine so I think the erl_ddll patch works, and
 > with the HiPE patch I could actually build erlang (a big improvement),
 > start a node, hipe compile and use the lists module in a simple test -
 > so I think that roughly works too.
 > 
 > Are there some test suites I could run to verify that these patches do
 > the right thing? If the patches are OK, what do I need to do to get them
 > included in a future OTP release?

First step is to publish the changesets as actual patches,
i.e., text files people can review and 'patch' can apply to
an unpacked vanilla R12B source tarball.

I did look around in that github thing, but couldn't immediately
find a way to export the changeset as a patch. At least one other
web git interface, the one at git.kernel.org, does allow that.

As far as getting OSX changes to hipe_x86_signal.c in upstream,
I'd say the chances are good.

/Mikael



More information about the erlang-patches mailing list