Bug 3428 – OSX 10.6.1 Access violation when writing to global variables

Status
RESOLVED
Resolution
FIXED
Severity
blocker
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86_64
OS
Mac OS X
Creation time
2009-10-20T14:40:00Z
Last change time
2014-04-18T09:12:02Z
Keywords
wrong-code
Assigned to
nobody
Creator
digitalmars

Comments

Comment #0 by digitalmars — 2009-10-20T14:40:22Z
DMD v1.050 (using pre-build binary) gcc version 4.2.1 (Apple Inc. build 5646) $ ld -v @(#)PROGRAM:ld PROJECT:ld64-95.2.12 DMD is creating a Mach-O executable i386 D source: int q; void main() { q = 1; // NB: Access violation occurs on WRITE only } Dump of assembler code for function _Dmain: 0x0000287c <_Dmain+0>: push %ebp 0x0000287d <_Dmain+1>: mov %esp,%ebp 0x0000287f <_Dmain+3>: call 0x2884 <_Dmain+8> 0x00002884 <_Dmain+8>: pop %eax 0x00002885 <_Dmain+9>: mov 0x1d0d0(%eax),%ecx 0x0000288b <_Dmain+15>: movl $0x1,(%ecx) <-- Access Violation here 0x00002891 <_Dmain+21>: xor %eax,%eax 0x00002893 <_Dmain+23>: pop %ebp Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00002f10 0x0000288b in _Dmain () (gdb) x 0x2f10 0x2f10 <D6object6Object14notifyRegisterMFDFC6ObjectZvZv>: 0x83ec8b55
Comment #1 by sean — 2010-06-07T21:06:37Z
Can't reproduce using DMD 2.046.
Comment #2 by nfxjfg — 2010-06-07T21:18:46Z
Sean, shouldn't this be marked as WORKSFORME, then?
Comment #3 by clugdbug — 2010-06-07T21:24:18Z
(In reply to comment #2) > Sean, shouldn't this be marked as WORKSFORME, then? If you've ever been able to reproduce the problem, it's FIXED. If not, its WORKSFORME.
Comment #4 by digitalmars — 2010-06-08T12:10:21Z
The original bug report was filed against DMD1, not DMD2. However, I can confirm that this bug is indeed fixed in DMD v1.061.