[Issue 2436] New: Unexpected OPTLINK termination

Max Samukha samukha at voliacable.com.removethis
Tue Nov 11 04:04:24 PST 2008


On Tue, 11 Nov 2008 10:48:11 +0100, Don <nospam at nospam.com> wrote:

>Max Samukha wrote:
>> On Thu, 06 Nov 2008 11:42:01 +0100, Don <nospam at nospam.com> wrote:
>> 
>>> d-bugmail at 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 at digitalmars.com
>>>>         ReportedBy: samukha at 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



More information about the Digitalmars-d-bugs mailing list