Not sure if this is a DMD or druntime issue.
Using dmd 1.062 on OS X 10.6:
--Calling ClassInfo.find() causes a seg fault.
Test case:
<factory_test.d>
module factory_test;
import std.stdio;
class TestClassA {}
void main() {
auto info = ClassInfo.find("factory_test.TestClassA");
}
Backtrace from gdb:
(gdb) r
Starting program: /Users/emsitesting/d/factory_test
Reading symbols for shared libraries +. done
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000018
0x00003150 in D6object9ClassInfo4findFAaZC9ClassInfo ()
(gdb) bt
#0 0x00003150 in D6object9ClassInfo4findFAaZC9ClassInfo ()
#1 0x00002749 in _Dmain ()
#2 0x000163fd in main ()
Because Object.factory depends on this, it also fails. This is an important issue for me as I have a GUI library written in D capable of building interfaces from markup which uses this functionality heavily. Runs fine on linux.
Comment #1 by doob — 2010-08-10T13:16:15Z
I cannot reproduce this error with either dmd 2.047 or dmd 1.062 with Tango on Mac OS X 10.6.4.
Comment #2 by mrjnewt — 2010-08-10T13:27:10Z
Unfortunately, there's no way I'll be porting this from phobos anytime soon.
(In reply to comment #1)
> I cannot reproduce this error with either dmd 2.047 or dmd 1.062 with Tango on
> Mac OS X 10.6.4.
Comment #3 by mrjnewt — 2010-08-12T09:10:04Z
Just downloaded and tested with 1.063 and the issue is gone.