[phobos] Showstopper bug: Hello world fails on OSX!

Brad Roberts braddr at puremagic.com
Wed Nov 10 16:44:01 PST 2010


On 11/10/2010 4:29 PM, Michel Fortin wrote:
> Le 2010-11-10 à 16:07, Brad Roberts a écrit :
> 
>> Returning for a second back to the original purpose of this thread.. has the
>> problem been identified?  It doesn't look like it, but figured I'd ask.
> 
> More or less. What's clear is that the three-section (begin, content, end) trick is not very reliable on Mac OS X because of the linker, and it doesn't appear consistent across different OS versions (this bug seem to be 10.5.x only). The solution that is expected to work is to replace the three-section trick with something more reliable.
> 
> It's true that the discussion has extended to support of dynamic libraries. That's mainly because loading a library involves the same process about finding the address and size for different segments in the library, and the solution was inspired from code meant to work with dynamic libraries.
> 
> If all we wanted was to fix this bug, probably calling this function to get the address and size of a section instead of the current method would be enough:
> 
> 	char* getsectdata(
> 	  const char* segname,
> 	  const char* sectname,
> 	  unsigned long* size);
> 
> It won't work with dynamic libraries, but I'd expect the hello world crash on 10.5.x to disappear.

Personally, I'm not impacted by any osx issues, but given the severity of the
failure for those that do use 10.5, I'd like to see a fix in the next release.
Either a big one or a temporary one, but something.  It'd probably be good to
try a quick fix, in case the larger set of changes take a while.

My 2 cents,
Brad




More information about the phobos mailing list