www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8130] New: Memory corruption because without *.def file DMD compiles DLL with assumption `_tls_index = 0`

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

           Summary: Memory corruption because without *.def file DMD
                    compiles DLL with assumption `_tls_index = 0`
           Product: D
           Version: D2
          Platform: All
        OS/Version: Windows
            Status: NEW
          Keywords: wrong-code
          Severity: critical
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: verylonglogin.reg gmail.com



18:09:46 MSD ---
Also without *.def file exported `extern(C)` symbols are prefixed with `_` and
require this prefix when obtained with GetProcAddress.

DMD should ether reject compiling DLL without module definition file or tell
optling that output is a library.

If there are reasons not to change current behavior, this trap should be
mentioned on top of dll.html (preferable in red color) and all D IDE developers
should be notified about this issue and catch such case on IDE level.

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




18:12:18 MSD ---
Created an attachment (id=1109)
Test for bug 8130

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




21:01:09 MSD ---
As a proof of this issue odiousness:
http://forum.dlang.org/thread/csqzdgdlgtuklmnwakrt forum.dlang.org

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


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla digitalmars.com



15:00:37 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1864

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 07 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8130




15:30:16 PDT ---
https://github.com/D-Programming-Language/d-programming-language.org/pull/313

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 07 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8130




Commits pushed to master at
https://github.com/D-Programming-Language/d-programming-language.org

https://github.com/D-Programming-Language/d-programming-language.org/commit/9bb8e01e1d53b9f3386d758c970f27646d014f49
fix Issue 8130 - Memory corruption because without *.def file DMD compiles DLL
with assumption

https://github.com/D-Programming-Language/d-programming-language.org/commit/ce9aa6f8b654af62a23e23fd51b2792ab5b4df03


fix Issue 8130 - Memory corruption because without *.def file DMD compil...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 07 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8130




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/efef6e99ec2d98cd100dd8f028be3389bbb80490
fix Issue 8130 - Memory corruption because without *.def file DMD compiles DLL
with assumption

https://github.com/D-Programming-Language/dmd/commit/3c2e4506f118ce6a9c8f6134123acafa47dec7c2


fix Issue 8130 - Memory corruption because without *.def file DMD compil...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 07 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8130


Walter Bright <bugzilla digitalmars.com> changed:

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


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 07 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8130




Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/4efb4c936a6a56e20c8b0056b5011ef396753480


fix Issue 8130 - Memory corruption because without *.def file DMD compil...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 07 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8130




10:44:17 MSD ---
So, the issue is fixed by documentation improvement. Can you also tell reasons
not to change current compiler behavior?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 07 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8130




01:03:59 PDT ---

 So, the issue is fixed by documentation improvement. Can you also tell reasons
 not to change current compiler behavior?
see https://github.com/D-Programming-Language/dmd/pull/1864 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 08 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8130




2013-04-08 12:22:28 MSD ---


 So, the issue is fixed by documentation improvement. Can you also tell reasons
 not to change current compiler behavior?
see https://github.com/D-Programming-Language/dmd/pull/1864
Sorry. Missed a compiler change pull. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 08 2013