D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4614 - ClassInfo.find seg faults on OS X
Summary: ClassInfo.find seg faults on OS X
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 Mac OS X
: P2 major
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-10 11:48 UTC by Justin Whear
Modified: 2010-08-12 09:10 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Justin Whear 2010-08-10 11:48:33 UTC
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 Jacob Carlborg 2010-08-10 13:16:15 UTC
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 Justin Whear 2010-08-10 13:27:10 UTC
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 Justin Whear 2010-08-12 09:10:04 UTC
Just downloaded and tested with 1.063 and the issue is gone.