Thread overview
[Issue 3428] New: OSX 10.6.1 Access violation when writing to global variables
Feb 22, 2010
Don
Jun 08, 2010
Sean Kelly
Jun 08, 2010
nfxjfg@gmail.com
Jun 08, 2010
Don
October 20, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3428

           Summary: OSX 10.6.1 Access violation when writing to global
                    variables
           Product: D
           Version: 1.050
          Platform: x86_64
        OS/Version: Mac OS X
            Status: NEW
          Severity: critical
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: digitalmars@chrisoneill.co.uk


--- Comment #0 from Christopher O'Neill <digitalmars@chrisoneill.co.uk> 2009-10-20 14:40:22 PDT ---
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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 22, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3428


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |blocker


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 08, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3428


Sean Kelly <sean@invisibleduck.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |sean@invisibleduck.org
         Resolution|                            |FIXED


--- Comment #1 from Sean Kelly <sean@invisibleduck.org> 2010-06-07 21:06:37 PDT ---
Can't reproduce using DMD 2.046.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 08, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3428


nfxjfg@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nfxjfg@gmail.com


--- Comment #2 from nfxjfg@gmail.com 2010-06-07 21:18:46 PDT ---
Sean, shouldn't this be marked as WORKSFORME, then?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 08, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3428



--- Comment #3 from Don <clugdbug@yahoo.com.au> 2010-06-07 21:24:18 PDT ---
(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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 08, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3428



--- Comment #4 from Christopher O'Neill <digitalmars@chrisoneill.co.uk> 2010-06-08 12:10:21 PDT ---
The original bug report was filed against DMD1, not DMD2.

However, I can confirm that this bug is indeed fixed in DMD v1.061.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------