[Issue 6376] New: Throwing exception or assertion failure causes segfault or memory error due to ASLR on Mac OS X 10.7
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jul 24 15:29:09 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6376
Summary: Throwing exception or assertion failure causes
segfault or memory error due to ASLR on Mac OS X 10.7
Product: D
Version: D2
Platform: x86
OS/Version: Mac OS X
Status: NEW
Keywords: EH, wrong-code
Severity: blocker
Priority: P2
Component: druntime
AssignedTo: nobody at puremagic.com
ReportedBy: kennytm at gmail.com
--- Comment #0 from kennytm at gmail.com 2011-07-24 15:29:07 PDT ---
Test case 1
---------------
void main() {
assert(0);
}
---------------
Running this program on 10.7 causes
Bus error: 10
while the expected output should be something like
core.exception.AssertError at y(2): Assertion failure
----------------
5 y 0x00009265 onAssertError + 65
6 y 0x000126ca _d_assertm + 30
...
Test case 2
---------------
void main() {
throw new Exception("");
}
---------------
Running this program on 10.7 causes
y(96008) malloc: *** error for object 0x14b060: pointer being freed was not
allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6
while the expected output should be something like
object.Exception at y.d(2):
----------------
5 y 0x00002320 _Dmain + 80
6 y 0x00012dc7 extern (C) int
rt.dmain2.main(int, char**).void runMain() + 23
...
I suspect the stack-trace routine has some code depending on having no ASLR, so
I've marked it a druntime problem.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list