Jump to page: 1 2
Thread overview
[Issue 4130] New: DMD crashes if it has to compile a project which is too complex
Apr 27, 2010
Torsten
Apr 27, 2010
Walter Bright
Apr 28, 2010
Torsten
Apr 28, 2010
Walter Bright
Apr 28, 2010
Torsten
Apr 28, 2010
Walter Bright
Apr 28, 2010
Walter Bright
Apr 28, 2010
Walter Bright
Apr 28, 2010
Robert Clipsham
Apr 28, 2010
Torsten
Apr 28, 2010
Torsten
Apr 28, 2010
Robert Clipsham
Apr 28, 2010
Torsten
Apr 28, 2010
Torsten
Apr 29, 2010
Torsten Sommerfeld
Apr 29, 2010
Walter Bright
April 27, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4130

           Summary: DMD crashes if it has to compile a project which is
                    too complex
           Product: D
           Version: 1.057
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: Globe13.Trotter17@gmx.de


--- Comment #0 from Torsten <Globe13.Trotter17@gmx.de> 2010-04-27 09:47:18 PDT ---
I am trying to compile a medium sized project of roughly 380 files (using phobos). As long as I keep the total code length (number of lines) under a limit (yet unknown) dmd creates the executeables sucessfully. However, if I add some functions to some classes or if I add some new files, it gives a segmentation fault after roughly 5 minutes of compiling which consumes 350 MiB of memory.

If I run dmd with -v, the last lines it prints are:

function  equals
function  notEquals
function  greater
function  lesser
function  greaterOrEqual
function  lesserOrEqual
function  like
function  notIn
function  In
function  this
function  saveToDB
function  saveToDB
function  loadFromDBAsString
Segmentation fault

As far as I can see, the gcc for linking is not called yet.

I have the same problem with older versions of dmd, however I cannot try dmd2.

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


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com


--- Comment #1 from Walter Bright <bugzilla@digitalmars.com> 2010-04-27 11:44:23 PDT ---
Is it possible you could run it under gdb and see where it is dying?

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



--- Comment #2 from Torsten <Globe13.Trotter17@gmx.de> 2010-04-27 21:10:12 PDT ---
(In reply to comment #1)
> Is it possible you could run it under gdb and see where it is dying?

I tried this but there are no debug symbols. I wounder if the memory address
can help you (gdb 6.8):


(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)

Program received signal SIGSEGV, Segmentation fault.
0x081427b7 in ?? ()
(gdb) quit
The program is running.  Exit anyway? (y or n) [answered Y; input not from
terminal]

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



--- Comment #3 from Walter Bright <bugzilla@digitalmars.com> 2010-04-28 06:29:57 PDT ---
Not really. Can you try recompiling dmd with debug symbols on?

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



--- Comment #4 from Torsten <Globe13.Trotter17@gmx.de> 2010-04-28 07:55:34 PDT ---
I have managed to compile dmd :)

Here is the output i got from gdb:


Program received signal SIGSEGV, Segmentation fault.
0x08180c2d in obj_comdat (s=0x1e40c464) at backend/elfobj.c:1489
1489        SegData[s->Sseg]->SDsym = s;
Current language:  auto; currently c++
(gdb) quit
The program is running.  Exit anyway? (y or n) [answered Y; input not from
terminal]

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



--- Comment #5 from Walter Bright <bugzilla@digitalmars.com> 2010-04-28 08:25:40 PDT ---
Hmm. Sseg is a short. I wonder if it's overflowing? (Each function is put into
its own seg.)

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



--- Comment #6 from Walter Bright <bugzilla@digitalmars.com> 2010-04-28 08:27:33 PDT ---
In backend/cc.h, try changing it from a short to an int.

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



--- Comment #7 from Walter Bright <bugzilla@digitalmars.com> 2010-04-28 09:01:48 PDT ---
See changeset 458 with the short => int fix.

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


Robert Clipsham <robert@octarineparrot.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |robert@octarineparrot.com


--- Comment #8 from Robert Clipsham <robert@octarineparrot.com> 2010-04-28 17:35:48 BST ---
If the fix Walter has mentioned didn't work, try typing 'bt full' instead of quitting straight away, that will give us a backtrace and the contents of the variables at each stage. It might be a big output, it should help figure out what's going wrong, if it isn't what Walter suspected.

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



--- Comment #9 from Torsten <Globe13.Trotter17@gmx.de> 2010-04-28 10:12:24 PDT ---
I can confirm it did not work. It took a long time too; this time.

Unfortunately I did not use gdb so I am doing it again for some stack trace.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
« First   ‹ Prev
1 2