www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8222] New: Optlink crashes when debug info is enabled

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8222

           Summary: Optlink crashes when debug info is enabled
           Product: D
           Version: D2
          Platform: All
        OS/Version: Windows
            Status: NEW
          Severity: major
          Priority: P2
         Component: Optlink
        AssignedTo: nobody puremagic.com
        ReportedBy: renezwanenburg gmail.com


--- Comment #0 from Rene Zwanenburg <renezwanenburg gmail.com> 2012-06-11
08:23:27 PDT ---
I've been struggling with an Optlink crash for the last two weeks now. There's
no clear offending code, it just 'sometimes happens' when hitting the build
key. The crash is consistent, so when I try to recompile the exact same code
Optlink will crash every time. After making some minor changes the problem will
usually go away. However, at the moment I can't find a way to work around it.

The project is medium sized, 66 modules, and I have no idea how to isolate a
small piece of code to reproduce the error. Like I said above, the error comes
up when working on completely different parts of the code.

So far the crash only occurs when debug info has been generated, so the problem
appears to be related to the presence of debug info. There's no difference
between -g and -gc.

The error message I get is:

Unexpected OPTLINK Termination at EIP=00428DA3
EAX=00000240 EBX=00000541 ECX=0043F7B4 EDX=00000240 ESI=02B23DC0 EDI=0043FD44
EBP=0018FF04 ESP=0018FEF8 First=00402000

I'm not sure if the message is the same with different code. I tried to get it
to fail with modified code, but you know how it works: when you try to make
something fail...

I know it's not much to go on. If I should provide any additional information
please let me know.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 11 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8222



--- Comment #1 from Rene Zwanenburg <renezwanenburg gmail.com> 2012-07-10
13:23:38 PDT ---
Today I finally managed to work around the issue. The offending line was:

auto list = _messageListeners.get(listener.type, new MessageListener[0]);

But the module containing that code hasn't been touched in months. The
workaround was as easy as replacing it with:

auto listPtr = listener.type in _messageListeners;
auto list = listPtr ? *listPtr : new MessageListener[](0);

I still haven't been able to get a similar crash with a reduced code base. I'll
document any future problems and their workarounds here to see if there's a
pattern.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 10 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8222


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yebblies gmail.com


--- Comment #2 from yebblies <yebblies gmail.com> 2012-11-01 19:31:46 EST ---
Could you provide the object files to reproduce this crash?  Otherwise it's
probably impossible to reproduce.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 01 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8222


Denis Shelomovskij <verylonglogin.reg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |verylonglogin.reg gmail.com
         Resolution|                            |DUPLICATE


--- Comment #3 from Denis Shelomovskij <verylonglogin.reg gmail.com> 2013-02-06
14:53:04 MSK ---
(In reply to comment #2)
 Could you provide the object files to reproduce this crash?  Otherwise it's
 probably impossible to reproduce.

A testcase is attached to Issue 7139 which is also a duplicate of Issue 6144. *** This issue has been marked as a duplicate of issue 6144 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 06 2013