Jump to page: 1 2
Thread overview
[Issue 2436] New: Unexpected OPTLINK termination
Oct 31, 2008
d-bugmail
Oct 31, 2008
d-bugmail
Oct 31, 2008
d-bugmail
Nov 06, 2008
Don
Nov 09, 2008
Max Samukha
Nov 11, 2008
Don
Nov 11, 2008
Max Samukha
Nov 13, 2008
d-bugmail
Feb 17, 2009
d-bugmail
Feb 17, 2009
d-bugmail
[Issue 2436] Unexpected OPTLINK termination EIP = 00425303 with /co
May 12, 2010
Don
Sep 02, 2010
Walter Bright
Sep 02, 2010
Max Samukha
Feb 22, 2011
Walter Bright
Feb 22, 2011
Walter Bright
Feb 28, 2011
changlon
Feb 28, 2011
Brad Roberts
Feb 28, 2011
Walter Bright
October 31, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2436

           Summary: Unexpected OPTLINK termination
           Product: D
           Version: 2.020
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: link-failure
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: samukha@voliacable.com


optlink fails to link an object file compiled with dmd 2.020 with -g or -gc switch.

CL: link test,,,user32+kernel32/co/noi;


-- 

October 31, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2436





------- Comment #1 from samukha@voliacable.com  2008-10-31 09:13 -------
Created an attachment (id=277)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=277&action=view)
offending obj


-- 

October 31, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2436


samukha@voliacable.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical




-- 

November 06, 2008
d-bugmail@puremagic.com wrote:
> http://d.puremagic.com/issues/show_bug.cgi?id=2436
> 
>            Summary: Unexpected OPTLINK termination
>            Product: D
>            Version: 2.020
>           Platform: PC
>         OS/Version: Windows
>             Status: NEW
>           Keywords: link-failure
>           Severity: normal
>           Priority: P2
>          Component: DMD
>         AssignedTo: bugzilla@digitalmars.com
>         ReportedBy: samukha@voliacable.com
> 
> 
> optlink fails to link an object file compiled with dmd 2.020 with -g or -gc
> switch.
> 
> CL: link test,,,user32+kernel32/co/noi;
> 
> 

I don't think that's an OPTLINK bug -- that obj file seems to be defective. And it's a really complicated obj file! Provide the source code for the smallest case which reproduces the problem.

Is it the same as #1439?
November 09, 2008
On Thu, 06 Nov 2008 11:42:01 +0100, Don <nospam@nospam.com> wrote:

>d-bugmail@puremagic.com wrote:
>> http://d.puremagic.com/issues/show_bug.cgi?id=2436
>> 
>>            Summary: Unexpected OPTLINK termination
>>            Product: D
>>            Version: 2.020
>>           Platform: PC
>>         OS/Version: Windows
>>             Status: NEW
>>           Keywords: link-failure
>>           Severity: normal
>>           Priority: P2
>>          Component: DMD
>>         AssignedTo: bugzilla@digitalmars.com
>>         ReportedBy: samukha@voliacable.com
>> 
>> 
>> optlink fails to link an object file compiled with dmd 2.020 with -g or -gc switch.
>> 
>> CL: link test,,,user32+kernel32/co/noi;
>> 
>> 
>
>I don't think that's an OPTLINK bug -- that obj file seems to be defective.

Then I think it's both dmd and optlink bug. The former is buggy because it produces invalid object file. The latter cannot gracefully recover from invalid input, so it's buggy as well.

>And it's a really complicated obj file! Provide the source code for the smallest case which reproduces the problem.
>

Changing/removing seemingly arbitrary stuff makes the error disappear. I don't have a smaller example yet.

>Is it the same as #1439?
November 11, 2008
Max Samukha wrote:
> On Thu, 06 Nov 2008 11:42:01 +0100, Don <nospam@nospam.com> wrote:
> 
>> d-bugmail@puremagic.com wrote:
>>> http://d.puremagic.com/issues/show_bug.cgi?id=2436
>>>
>>>            Summary: Unexpected OPTLINK termination
>>>            Product: D
>>>            Version: 2.020
>>>           Platform: PC
>>>         OS/Version: Windows
>>>             Status: NEW
>>>           Keywords: link-failure
>>>           Severity: normal
>>>           Priority: P2
>>>          Component: DMD
>>>         AssignedTo: bugzilla@digitalmars.com
>>>         ReportedBy: samukha@voliacable.com
>>>
>>>
>>> optlink fails to link an object file compiled with dmd 2.020 with -g or -gc
>>> switch.
>>>
>>> CL: link test,,,user32+kernel32/co/noi;
>>>
>>>
>> I don't think that's an OPTLINK bug -- that obj file seems to be defective.
> 
> Then I think it's both dmd and optlink bug. The former is buggy
> because it produces invalid object file. The latter cannot gracefully
> recover from invalid input, so it's buggy as well.

I checked again, and the obj file seems to be OK. So I'm wrong about that -- it's just an OPTLINK problem.
> 
>> And it's a really complicated obj file! Provide the source code for the smallest case which reproduces the problem.
>>
> 
> Changing/removing seemingly arbitrary stuff makes the error disappear.
> I don't have a smaller example yet.

Yeah. But it probably won't get fixed unless you can simplify it.
Mind you, OPTLINK is unlikely to get fixed, anyway. But maybe Walter can change DMD slightly to work around the optlink bug.

>> Is it the same as #1439?
#1439 shows that something bad happens when the symbol length is a particular length (out-by-1 error?). I think this is quite likely to be the same issue, since you have so many templates in there.
November 11, 2008
On Tue, 11 Nov 2008 10:48:11 +0100, Don <nospam@nospam.com> wrote:

>Max Samukha wrote:
>> On Thu, 06 Nov 2008 11:42:01 +0100, Don <nospam@nospam.com> wrote:
>> 
>>> d-bugmail@puremagic.com wrote:
>>>> http://d.puremagic.com/issues/show_bug.cgi?id=2436
>>>>
>>>>            Summary: Unexpected OPTLINK termination
>>>>            Product: D
>>>>            Version: 2.020
>>>>           Platform: PC
>>>>         OS/Version: Windows
>>>>             Status: NEW
>>>>           Keywords: link-failure
>>>>           Severity: normal
>>>>           Priority: P2
>>>>          Component: DMD
>>>>         AssignedTo: bugzilla@digitalmars.com
>>>>         ReportedBy: samukha@voliacable.com
>>>>
>>>>
>>>> optlink fails to link an object file compiled with dmd 2.020 with -g or -gc switch.
>>>>
>>>> CL: link test,,,user32+kernel32/co/noi;
>>>>
>>>>
>>> I don't think that's an OPTLINK bug -- that obj file seems to be defective.
>> 
>> Then I think it's both dmd and optlink bug. The former is buggy because it produces invalid object file. The latter cannot gracefully recover from invalid input, so it's buggy as well.
>
>I checked again, and the obj file seems to be OK. So I'm wrong about that -- it's just an OPTLINK problem.
>> 
>>> And it's a really complicated obj file! Provide the source code for the smallest case which reproduces the problem.
>>>
>> 
>> Changing/removing seemingly arbitrary stuff makes the error disappear. I don't have a smaller example yet.
>
>Yeah. But it probably won't get fixed unless you can simplify it.
>Mind you, OPTLINK is unlikely to get fixed, anyway. But maybe Walter can
>change DMD slightly to work around the optlink bug.
I'll try to reduce it when I have time.
>
>>> Is it the same as #1439?
>#1439 shows that something bad happens when the symbol length is a particular length (out-by-1 error?). I think this is quite likely to be the same issue, since you have so many templates in there.

It may be that issue. But it seems to depend not only on the length of a particular symbol generated by a template instantiation. For example, the error dissapears when I remove an unreferenced non-templated function, while other declarations can be safely removed without affecting the bug. No clue

November 13, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2436





------- Comment #2 from samukha@voliacable.com  2008-11-13 00:55 -------
Probably a duplicate of #1439 or/and #424. I suggest voting for #424 as it already has a couple of votes :)


-- 

February 17, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2436





------- Comment #3 from bugzilla@digitalmars.com  2009-02-16 19:35 -------
I tried linking this obj file, and it linked without complaint, and runs printing "Test".

I suspect the problem may be with multithreading on a multicore system. My system is single core. If you're running multicore, is there a way to use only one core and try it that way?


-- 

February 17, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2436





------- Comment #4 from samukha@voliacable.com  2009-02-17 02:45 -------
It fails on a single core. Are you sure you specified /co for the linker? It fails only with the CodeView stuff turned on. Please try to link it like this: dmd test.obj -g


-- 

« First   ‹ Prev
1 2