[phobos] "bus error" happens on Mac OS X
Steve Schveighoffer
schveiguy at yahoo.com
Fri Nov 12 04:20:06 PST 2010
I think the Mac OS code generation has some issues.
In the original code before I checked that in, every module index is set (see
the revision before 414:
http://dsource.org/projects/druntime/browser/trunk/src/object_.d?rev=405#L1900).
I don't see why r414 fails and r413 doesn't.
BTW, I just noticed, a lot of the code in prior versions checks to see if the
array contains null pointers, does this happen? I don't think I put those
guards in.
Masahiro, can you run an assert loop like so? I don't have a Mac, and
everything appears to work fine on Linux.
foreach(m; _moduleinfo_array)
if(!m)
assert(0, "found null reference");
-Steve
----- Original Message ----
> From: Masahiro Nakagawa <repeatedly at gmail.com>
> To: Phobos mailing list <phobos at puremagic.com>
> Sent: Fri, November 12, 2010 12:03:01 AM
> Subject: [phobos] "bus error" happens on Mac OS X
>
> Any programs raised "bus error" in the trunk (My environment is Mac OS X
>10.6.4).
> I checked druntime and found problematic revision.
> r413 works fine but r414 and later don't (Phobos unittest stopped at crc32
>test).
>
> http://dsource.org/projects/druntime/changeset/414
>
> The cause is an access to _moduleinfo_array.
> In the above link, "m.index = i;" at line 2045 is because of this bug.
> But, but, but, r414 doesn't change the creation routine of _moduleinfo_array.
>
> It's a mystery to me... Why?
>
>
> Masahiro
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
>
More information about the phobos
mailing list