www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2436] New: Unexpected OPTLINK termination

reply d-bugmail puremagic.com writes:
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;


-- 
Oct 31 2008
next sibling parent d-bugmail puremagic.com writes:
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


-- 
Oct 31 2008
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2436


samukha voliacable.com changed:

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




-- 
Oct 31 2008
prev sibling next sibling parent reply Don <nospam nospam.com> writes:
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?
Nov 06 2008
parent reply Max Samukha <samukha voliacable.com.removethis> writes:
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?

Nov 09 2008
parent reply Don <nospam nospam.com> writes:
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;

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?


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.
Nov 11 2008
parent Max Samukha <samukha voliacable.com.removethis> writes:
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;

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?


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
Nov 11 2008
prev sibling next sibling parent d-bugmail puremagic.com writes:
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 :)


-- 
Nov 12 2008
prev sibling next sibling parent d-bugmail puremagic.com writes:
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?


-- 
Feb 16 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
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


-- 
Feb 17 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2436


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug yahoo.com.au
            Summary|Unexpected OPTLINK          |Unexpected OPTLINK
                   |termination                 |termination EIP = 00425303
                   |                            |with /co


--- Comment #5 from Don <clugdbug yahoo.com.au> 2010-05-12 12:36:28 PDT ---
This is not the same as bug 1439 or bug 424, which have both been fixed.
I can reproduce it by:
 link test.obj /co

but it still crashes). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 12 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2436



--- Comment #6 from Walter Bright <bugzilla digitalmars.com> 2010-09-01
18:14:17 PDT ---
I can duplicate the problem, and I know where in optlink it is failing, but I
don't know why.

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


Max Samukha <samukha voliacable.com> changed:

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


--- Comment #7 from Max Samukha <samukha voliacable.com> 2010-09-02 01:54:57
PDT ---
This test case was created in the days when I was overly enthusiastic about
templates, ctfe and stuff. Now I don't have any code that triggers this error.
Lowering the severity to normal as nobody else seems to have suffered from this
particular bug.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 02 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2436


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


--- Comment #8 from Walter Bright <bugzilla digitalmars.com> 2011-02-21
21:01:46 PST ---
Fixed Optlink 8.00.9

http://ftp.digitalmars.com/link.8.00.9.zip

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 21 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2436


Walter Bright <bugzilla digitalmars.com> changed:

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


--- Comment #9 from Walter Bright <bugzilla digitalmars.com> 2011-02-22
02:18:15 PST ---
*** Issue 4808 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 22 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2436


changlon <changlon gmail.com> changed:

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


--- Comment #10 from changlon <changlon gmail.com> 2011-02-28 00:58:50 PST ---
http://gool.googlecode.com/files/optlink80011_bug.rar

8.00.11 crash .

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 28 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2436


Brad Roberts <braddr puremagic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |braddr puremagic.com


--- Comment #11 from Brad Roberts <braddr puremagic.com> 2011-02-28 01:06:20
PST ---
Please open a new bug unless you have a particularly good reason to believe the
crash you're seeing is directly tied to the same cause as this bug.  Given that
this bug is closed, it's almost a certainty that your issue will be overlooked
/ lost.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 28 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2436



--- Comment #12 from Walter Bright <bugzilla digitalmars.com> 2011-02-28
13:26:04 PST ---
(In reply to comment #10)
 http://gool.googlecode.com/files/optlink80011_bug.rar
 8.00.11 crash .

Resubmitted as bugzilla 5670 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 28 2011