[Issue 9044] Random "Previous Definition Different" optlink failure (looks like a buffer overflow bug somewhere)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Mar 11 02:56:48 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9044



--- Comment #21 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2013-03-11 12:56:43 MSK ---
This is definitely a dmd bug, not OPTLINK as it is also triggered when building
a library (when dmd doesn't call linker).

`f` is a member function of a class:
---
void f()
{
    auto a = asJSON(["type": asJSON(to!string(type))]);
    auto b = asJSON(cycleData.map!(d => toJSON(d.height))().array());
    auto c = asJSON(zip(cycleData, sequence!`a[0] + n`(cast()
creationCycle)).filter!`!a[0].available`().map!(a => asJSON(a[1]))().array());
}
---

If any of 3 `f`'s lines are commented out the library compiles fine into `.lib`
file. Otherwise dmd fails with:
---
xxx.lib: Error: multiple definition of object_32e_f8d:
_D65D:\D\dmd2head\windows\bin\..\..\src\druntime\import\object.di.81412__ModuleInfoZ
and object:
_D65D:\D\dmd2head\windows\bin\..\..\src\druntime\import\object.di.81412__ModuleInfoZ
xxx.lib: Error: multiple definition of object_32e_f8d:
_D65D:\D\dmd2head\windows\bin\..\..\src\druntime\import\object.di.8147__arrayZ
and object:
_D65D:\D\dmd2head\windows\bin\..\..\src\druntime\import\object.di.8147__arrayZ
xxx.lib: Error: multiple definition of object_32e_f8d:
_D65D:\D\dmd2head\windows\bin\..\..\src\druntime\import\object.di.8148__assertFiZv
and object:
_D65D:\D\dmd2head\windows\bin\..\..\src\druntime\import\object.di.8148__assertFiZv
xxx.lib: Error: multiple definition of object_32e_f8d:
_D65D:\D\dmd2head\windows\bin\..\..\src\druntime\import\object.di.81415__unittest_failFiZv
and object:
_D65D:\D\dmd2head\windows\bin\..\..\src\druntime\import\object.di.81415__unittest_failFiZv
---

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


More information about the Digitalmars-d-bugs mailing list