[Issue 12066] New: dmd on osx 10.9 in 32 bit mode memory corruption

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Feb 2 14:34:40 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12066

           Summary: dmd on osx 10.9 in 32 bit mode memory corruption
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Mac OS X
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: braddr at puremagic.com


--- Comment #0 from Brad Roberts <braddr at puremagic.com> 2014-02-02 14:34:36 PST ---
I haven't been able to reproduce this on linux or osx 10.9 in 64 bit mode. 
Valgrind doesn't yet work on 10.9, so won't help.  This is the first time I'm
trying with 10.9, so I don't know if it's a regression or always been buggy. 
10.9 is the first osx release that ships without gcc, only with llvm.

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix

(gdb doesn't ship with osx, I installed it via macports since I don't have the
time to learn lldb)

$ ggdb --args ../dmd/src/dmd -I../druntime/import  -w -m32  -O -release
-unittest -c -ofgenerated/osx/release/32/unittest/std/format.o
-deps=generated/osx/release/32/unittest/std/format.deps.tmp std/format.d

(gdb) run
Starting program:
/Users/braddr/sandbox/d/d-tester/client/master-test-Darwin_32/dmd/src/dmd
-I../druntime/import -w -m32 -O -release -unittest -c
-ofgenerated/osx/release/32/unittest/std/format.o
-deps=generated/osx/release/32/unittest/std/format.deps.tmp std/format.d
DMD v2.065-devel-af8917b DEBUG

Program received signal SIGSEGV, Segmentation fault.
0x9bb226f5 in ?? ()
(gdb) bt
#0  0x9bb226f5 in ?? ()
#1  0x97c87d1d in ?? ()
#2  0x002292d4 in mem_free (ptr=0x12dd0e00) at tk/mem.c:691
#3  0x12dd0e00 in ?? ()
#4  0x0021512b in codgen () at backend/cgcod.c:559
#5  0x00000000 in ?? ()


(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y

Starting program:
/Users/braddr/sandbox/d/d-tester/client/master-test-Darwin_32/dmd/src/dmd
-I../druntime/import -w -m32 -O -release -unittest -c
-ofgenerated/osx/release/32/unittest/std/format.o
-deps=generated/osx/release/32/unittest/std/format.deps.tmp std/format.d
DMD v2.065-devel-af8917b DEBUG

Program received signal SIGILL, Illegal instruction.
0x9bb226e8 in ?? ()
(gdb) bt
#0  0x9bb226e8 in ?? ()
#1  0x97c7e26d in ?? ()
#2  0x97c87d1d in ?? ()
#3  0x002292d4 in mem_free (ptr=0xf7f6e00) at tk/mem.c:691
#4  0x0f7f6e00 in ?? ()
#5  0x0021512b in codgen () at backend/cgcod.c:559
#6  0x00000000 in ?? ()


(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y

Starting program:
/Users/braddr/sandbox/d/d-tester/client/master-test-Darwin_32/dmd/src/dmd
-I../druntime/import -w -m32 -O -release -unittest -c
-ofgenerated/osx/release/32/unittest/std/format.o
-deps=generated/osx/release/32/unittest/std/format.deps.tmp std/format.d
DMD v2.065-devel-af8917b DEBUG
[Inferior 1 (process 84289) exited normally]


(gdb) run
Starting program:
/Users/braddr/sandbox/d/d-tester/client/master-test-Darwin_32/dmd/src/dmd
-I../druntime/import -w -m32 -O -release -unittest -c
-ofgenerated/osx/release/32/unittest/std/format.o
-deps=generated/osx/release/32/unittest/std/format.deps.tmp std/format.d
DMD v2.065-devel-af8917b DEBUG
[Inferior 1 (process 84303) exited normally]
(gdb) run
Starting program:
/Users/braddr/sandbox/d/d-tester/client/master-test-Darwin_32/dmd/src/dmd
-I../druntime/import -w -m32 -O -release -unittest -c
-ofgenerated/osx/release/32/unittest/std/format.o
-deps=generated/osx/release/32/unittest/std/format.deps.tmp std/format.d
DMD v2.065-devel-af8917b DEBUG
dmd(84304,0xa05de1a8) malloc: *** error for object 0x157f7a04: incorrect
checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug

Program received signal SIGABRT, Aborted.
0x927cb952 in ?? ()
(gdb) bt
#0  0x927cb952 in ?? ()
#1  0x98aa9340 in ?? ()
#2  0x97c804b6 in ?? ()
#3  0x97c81c8d in ?? ()
#4  0x97c86276 in ?? ()
#5  0x97c85442 in ?? ()
#6  0x97c7ab6a in ?? ()
#7  0x97c7c683 in ?? ()
#8  0x97c879e9 in ?? ()
#9  0x97c88065 in ?? ()
#10 0x00212443 in symtab_realloc (tab=0x127f7e00, symmax=129) at
backend/symbol.c:62
#11 0x00000204 in Visitor::visit (this=0xbfffec28) at ./visitor.h:275
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

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


More information about the Digitalmars-d-bugs mailing list