www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2378] New: Win32 OPTLINK crashes when it links some kind of static library into a executeable.

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

           Summary: Win32 OPTLINK crashes when it links some kind of static
                    library into a executeable.
           Product: D
           Version: 2.018
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: link-failure
          Severity: critical
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: hskwk inter7.jp


Windows dmd (later than 2.018) OPTLINK crashes (Unexpected OPTLINK termination)
when it links some kind of static library into a executable.
Here is a small example as a quick report.


---- make following module into a static library

module test;
import std.random;
Mt19937 gen;
uint nonThreadSafeRandom() {return gen.next;}


---- OPTLINK crashes when making following code into a exe with linking the
library just made before

import test;
void main() { uint a = nonThreadSafeRandom(); }

---- OPTLINK works if deeper module is imported

import test, std.random;
void main() { uint a = nonThreadSafeRandom(); }



This is a quick report, I have not found a true cause yet.

thanks,

p.s.
I'm sorry posting redundant news on digitalmars.D.bugs.
I wish this tracker is the proper channel to report bugs.


-- 
Sep 29 2008
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2378





------- Comment #1 from bugzilla digitalmars.com  2008-10-02 03:35 -------
Please include what commands you used to generate the problem.


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





------- Comment #2 from hskwk inter7.jp  2008-10-02 08:33 -------
(In reply to comment #1)
 Please include what commands you used to generate the problem.
 

Commands I used in the first report dmd -c test.d lib -c -p32 test.lib test.obj dmd main.d test.lib causes crash described before. following commands dmd -lib test.d dmd main.d test.lib causes this error, regardless of importing std.random: test.lib Warning 140: Library probably needs FIXLIB --- error level 1 Only std.random causes this error, as I tested. --
Oct 02 2008
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2378



--- Comment #3 from Walter Bright <bugzilla digitalmars.com> 2010-09-01
17:32:23 PDT ---
I can't duplicate the optlink crash, but I can the needs FIXLIB problem.

-- 
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=2378



--- Comment #4 from Walter Bright <bugzilla digitalmars.com> 2010-09-01
17:47:07 PDT ---
I'm not sure what the FIXLIB warning is about, but I think it can be safely
ignored.

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


Walter Bright <bugzilla digitalmars.com> changed:

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


--- Comment #5 from Walter Bright <bugzilla digitalmars.com> 2010-09-01
20:36:30 PDT ---
Warning removed in link 8.00.7, the crash is not reproducible.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 01 2010