Thread overview
DMD segv
Nov 15, 2005
Kris
Nov 15, 2005
clayasaurus
Nov 15, 2005
Don Clugston
Nov 18, 2005
Thomas Kuehne
Nov 19, 2005
Kris
Nov 19, 2005
Thomas Kuehne
Nov 20, 2005
Kris
November 15, 2005
This kills DMD v137 (related to the ellipses in Bar.ctor):

class Bar
{
        this(...) {}
}

class Foo
{
        void opAdd (Bar b) {}
}

void main()
{
        auto f = new Foo;
        f + new Bar;
}



November 15, 2005
Odd, it doesn't seg under DMD v139 on linux.

Kris wrote:
> This kills DMD v137 (related to the ellipses in Bar.ctor):
> 
> class Bar
> {
>         this(...) {}
> }
> 
> class Foo
> {
>         void opAdd (Bar b) {}
> }
> 
> void main()
> {
>         auto f = new Foo;
>         f + new Bar;
> }
> 
> 
> 
November 15, 2005
clayasaurus wrote:
> Odd, it doesn't seg under DMD v139 on linux.

DMD 0.138 on Windows also accepts it without complaint.

> Kris wrote:
> 
>> This kills DMD v137 (related to the ellipses in Bar.ctor):
>>
>> class Bar
>> {
>>         this(...) {}
>> }
>>
>> class Foo
>> {
>>         void opAdd (Bar b) {}
>> }
>>
>> void main()
>> {
>>         auto f = new Foo;
>>         f + new Bar;
>> }
>>
>>
>>
November 18, 2005
Kris schrieb am 2005-11-15:
> This kills DMD v137 (related to the ellipses in Bar.ctor):
>
> class Bar
> {
>         this(...) {}
> }
>
> class Foo
> {
>         void opAdd (Bar b) {}
> }
>
> void main()
> {
>         auto f = new Foo;
>         f + new Bar;
> }

What tools and OS did you use and exactly when did DMD crash?

Thomas


November 19, 2005
Build; WinXP; and when compiling ~ WinXP prompts with one of these alerts: "dmd.exe has encountered a problem and needs to close. We are sorry for the inconvenience."

Removing the ellipses makes it operate fine.


Additionally, this variation:

class Bar
{
        this(int i, ...) {}
}

class Foo
{
        void opAdd (Bar b) {}
}

void main()
{
        auto f = new Foo;
        f + new Bar(1, 0); // error here
}

produces this error:

template.d: constructor template.Bar.this (int,...) does not match argument
types (TypeInfo[],int,int)
cannot implicitly convert expression (_arguments_i) of type TypeInfo[] to
int




"Thomas Kuehne" <thomas-dloop@kuehne.cn> wrote in message news:5ud253-0b4.ln1@birke.kuehne.cn...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Kris schrieb am 2005-11-15:
>> This kills DMD v137 (related to the ellipses in Bar.ctor):
>>
>> class Bar
>> {
>>         this(...) {}
>> }
>>
>> class Foo
>> {
>>         void opAdd (Bar b) {}
>> }
>>
>> void main()
>> {
>>         auto f = new Foo;
>>         f + new Bar;
>> }
>
> What tools and OS did you use and exactly when did DMD crash?
>
> Thomas
>
>
> -----BEGIN PGP SIGNATURE-----
>
> iD8DBQFDfoil3w+/yD4P9tIRAo2sAJ4x/WJveSHGdURM0+dYnb8nvU3vFACeJkH5
> srXOzjFF+UXam10xZpTajkM=
> =yyGd
> -----END PGP SIGNATURE----- 


November 19, 2005
Kris schrieb am 2005-11-19:
> Build; WinXP; and when compiling ~ WinXP prompts with one of these alerts: "dmd.exe has encountered a problem and needs to close. We are sorry for the inconvenience."
>
> Removing the ellipses makes it operate fine.

I can't reproduce this with WindowsXP and dmd-0.137.
Are you sure that this is DMD's fault and not a "virus scanner" or
some other "security" tool?

> Additionally, this variation:
>
> class Bar
> {
>         this(int i, ...) {}
> }
>
> class Foo
> {
>         void opAdd (Bar b) {}
> }
>
> void main()
> {
>         auto f = new Foo;
>         f + new Bar(1, 0); // error here
> }
>
> produces this error:
>
> template.d: constructor template.Bar.this (int,...) does not match argument
> types (TypeInfo[],int,int)
> cannot implicitly convert expression (_arguments_i) of type TypeInfo[] to
> int

Added to DStress as http://dstress.kuehne.cn/run/v/variadic_argument_10_A.d http://dstress.kuehne.cn/run/v/variadic_argument_10_B.d http://dstress.kuehne.cn/run/v/variadic_argument_10_C.d http://dstress.kuehne.cn/run/v/variadic_argument_10_D.d http://dstress.kuehne.cn/run/v/variadic_argument_10_E.d http://dstress.kuehne.cn/run/v/variadic_argument_10_F.d

Some of those tests crash if "-fPIC" is used:
"Internal error: ../ztc/cgelem.c 4574"

Thomas


November 20, 2005
"Thomas Kuehne" <thomas-dloop@kuehne.cn> wrote..
> Kris schrieb am 2005-11-19:
>> Build; WinXP; and when compiling ~ WinXP prompts with one of these
>> alerts:
>> "dmd.exe has encountered a problem and needs to close. We are sorry for
>> the
>> inconvenience."
>>
>> Removing the ellipses makes it operate fine.
>
> I can't reproduce this with WindowsXP and dmd-0.137.
> Are you sure that this is DMD's fault and not a "virus scanner" or
> some other "security" tool?


Perhaps ... but then why would it work when the ellipses are removed? It's a mystery.