April 07, 2010
On 7 April 2010 22:32, Walter Bright <walter at digitalmars.com> wrote:
>
>
> Steve Schveighoffer wrote:
>>
>> David Simcha reports that this beta fixes his corruption issues.
>>
>>
>>
>
> Good. If nothing else crops up, I'll plan on releasing it tonight.

Two things:
(1) One simple thing: please replace the file minit.obj with a fresh
one, which has a date more recent than minit.asm.
That'll allow it to build without requiring masm.

(2) I'm working on tracking down the Phobos unittest stack overflow. It seems to be a regression. I've cut it down to this test case:
---
import std.variant;
import std.typecons;

alias Tuple!(Variant) crash;
---
There have been no relevant changes to Phobos. I'm still working on it.
April 07, 2010
On 04/07/2010 03:44 PM, Don Clugston wrote:
> Two things:
> (1) One simple thing: please replace the file minit.obj with a fresh
> one, which has a date more recent than minit.asm.
> That'll allow it to build without requiring masm.

Yes please.

Andrei
April 07, 2010
On 7 April 2010 22:44, Don Clugston <dclugston at googlemail.com> wrote:
> On 7 April 2010 22:32, Walter Bright <walter at digitalmars.com> wrote:
>>
>>
>> Steve Schveighoffer wrote:
>>>
>>> David Simcha reports that this beta fixes his corruption issues.
>>>
>>>
>>>
>>
>> Good. If nothing else crops up, I'll plan on releasing it tonight.
>
> Two things:
> (1) One simple thing: please replace the file minit.obj with a fresh
> one, which has a date more recent than minit.asm.
> That'll allow it to build without requiring masm.
>
> (2) I'm working on tracking down the Phobos unittest stack overflow. It seems to be a regression. I've cut it down to this test case:
> ---
> import std.variant;
> import std.typecons;
>
> alias Tuple!(Variant) crash;
> ---
> There have been no relevant changes to Phobos. I'm still working on it.

It compiled in DMD svn 421, and fails in svn 423. It's caused by the ".init property for static arrays is now an array literal." change.
April 07, 2010
>> (2) I'm working on tracking down the Phobos unittest stack overflow. It seems to be a regression. I've cut it down to this test case:
>> ---
>> import std.variant;
>> import std.typecons;
>>
>> alias Tuple!(Variant) crash;
>> ---
>> There have been no relevant changes to Phobos. I'm still working on it.
>
> It compiled in DMD svn 421, and fails in svn 423. It's caused by the ".init property for static arrays is now an array literal." change.

Here's the problem:

conv.d,  line 260:
/**
For structs that do not define $(D toString), the conversion to string
produces the list of fields.
 */
T to(T, S)(S s, in T left = S.stringof~"(", in T separator = ", ",
        in T right = ")")
if (is(S == struct) && isSomeString!(T) && !is(typeof(&S.init.toString)))
{
    Tuple!(FieldTypeTuple!(S)) * t = void;     // < ---------- Creates a Tuple
----------
and Tuple contains toString, defined in typecons.d line 435:

    string toString()
    {
        char[] result;
        auto app = appender(&result);
        app.put(toStringHeader);
        foreach (i, Unused; noStrings!(T).Result)
        {
            static if (i > 0) result ~= toStringSeparator;
            static if (is(typeof(to!string(field[i]))))
<------------ this is calls to!()
                app.put(to!string(field[i]));
------------

And that's all I have time for. I think this should fixed before the release goes out -- it's a pretty nasty regression.
April 07, 2010

Don Clugston wrote:
> It's caused by the
> ".init property for static arrays is now an array literal." change.
>
> 

I'm not surprised.
April 07, 2010
Hmm, nothing jumps out as obviously wrong there, though it clearly has something to do with the .init. It should perhaps use .init[0] instead.

Don Clugston wrote:
>>> (2) I'm working on tracking down the Phobos unittest stack overflow. It seems to be a regression. I've cut it down to this test case:
>>> ---
>>> import std.variant;
>>> import std.typecons;
>>>
>>> alias Tuple!(Variant) crash;
>>> ---
>>> There have been no relevant changes to Phobos. I'm still working on it.
>>> 
>> It compiled in DMD svn 421, and fails in svn 423. It's caused by the
>> ".init property for static arrays is now an array literal." change.
>> 
>
> Here's the problem:
>
> conv.d,  line 260:
> /**
> For structs that do not define $(D toString), the conversion to string
> produces the list of fields.
>  */
> T to(T, S)(S s, in T left = S.stringof~"(", in T separator = ", ",
>         in T right = ")")
> if (is(S == struct) && isSomeString!(T) && !is(typeof(&S.init.toString)))
> {
>     Tuple!(FieldTypeTuple!(S)) * t = void;     // < ---------- Creates a Tuple
> ----------
> and Tuple contains toString, defined in typecons.d line 435:
>
>     string toString()
>     {
>         char[] result;
>         auto app = appender(&result);
>         app.put(toStringHeader);
>         foreach (i, Unused; noStrings!(T).Result)
>         {
>             static if (i > 0) result ~= toStringSeparator;
>             static if (is(typeof(to!string(field[i]))))
> <------------ this is calls to!()
>                 app.put(to!string(field[i]));
> ------------
>
> And that's all I have time for. I think this should fixed before the
> release goes out -- it's a pretty nasty regression.
> _______________________________________________
> dmd-beta mailing list
> dmd-beta at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>
>
> 
April 07, 2010
Guys, it's unlikely I can work on this.

Andrei

On 04/07/2010 05:32 PM, Walter Bright wrote:
> Hmm, nothing jumps out as obviously wrong there, though it clearly has something to do with the .init. It should perhaps use .init[0] instead.
>
> Don Clugston wrote:
>>>> (2) I'm working on tracking down the Phobos unittest stack overflow. It seems to be a regression. I've cut it down to this test case:
>>>> ---
>>>> import std.variant;
>>>> import std.typecons;
>>>>
>>>> alias Tuple!(Variant) crash;
>>>> ---
>>>> There have been no relevant changes to Phobos. I'm still working on it.
>>> It compiled in DMD svn 421, and fails in svn 423. It's caused by the ".init property for static arrays is now an array literal." change.
>>
>> Here's the problem:
>>
>> conv.d, line 260:
>> /**
>> For structs that do not define $(D toString), the conversion to string
>> produces the list of fields.
>> */
>> T to(T, S)(S s, in T left = S.stringof~"(", in T separator = ", ",
>> in T right = ")")
>> if (is(S == struct) && isSomeString!(T) && !is(typeof(&S.init.toString)))
>> {
>> Tuple!(FieldTypeTuple!(S)) * t = void; // < ---------- Creates a Tuple
>> ----------
>> and Tuple contains toString, defined in typecons.d line 435:
>>
>> string toString()
>> {
>> char[] result;
>> auto app = appender(&result);
>> app.put(toStringHeader);
>> foreach (i, Unused; noStrings!(T).Result)
>> {
>> static if (i > 0) result ~= toStringSeparator;
>> static if (is(typeof(to!string(field[i]))))
>> <------------ this is calls to!()
>> app.put(to!string(field[i]));
>> ------------
>>
>> And that's all I have time for. I think this should fixed before the
>> release goes out -- it's a pretty nasty regression.
>> _______________________________________________
>> dmd-beta mailing list
>> dmd-beta at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>>
>>
> _______________________________________________
> dmd-beta mailing list
> dmd-beta at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-beta
April 08, 2010
Further reduced test case:

import std.typecons;

struct V {
      void * p[1];
}

alias Tuple!(V) crash;

It seems to be related to the use of void *. (If you make V just struct V { void *p;}  it will still crash, but it's harder to debug).



On 8 April 2010 00:32, Walter Bright <walter at digitalmars.com> wrote:
> Hmm, nothing jumps out as obviously wrong there, though it clearly has something to do with the .init. It should perhaps use .init[0] instead.
>
> Don Clugston wrote:
>>>>
>>>> (2) I'm working on tracking down the Phobos unittest stack overflow. It seems to be a regression. I've cut it down to this test case:
>>>> ---
>>>> import std.variant;
>>>> import std.typecons;
>>>>
>>>> alias Tuple!(Variant) crash;
>>>> ---
>>>> There have been no relevant changes to Phobos. I'm still working on it.
>>>>
>>>
>>> It compiled in DMD svn 421, and fails in svn 423. It's caused by the ".init property for static arrays is now an array literal." change.
>>>
>>
>> Here's the problem:
>>
>> conv.d, ?line 260:
>> /**
>> For structs that do not define $(D toString), the conversion to string
>> produces the list of fields.
>> ?*/
>> T to(T, S)(S s, in T left = S.stringof~"(", in T separator = ", ",
>> ? ? ? ?in T right = ")")
>> if (is(S == struct) && isSomeString!(T) && !is(typeof(&S.init.toString)))
>> {
>> ? ?Tuple!(FieldTypeTuple!(S)) * t = void; ? ? // < ---------- Creates a
>> Tuple
>> ----------
>> and Tuple contains toString, defined in typecons.d line 435:
>>
>> ? ?string toString()
>> ? ?{
>> ? ? ? ?char[] result;
>> ? ? ? ?auto app = appender(&result);
>> ? ? ? ?app.put(toStringHeader);
>> ? ? ? ?foreach (i, Unused; noStrings!(T).Result)
>> ? ? ? ?{
>> ? ? ? ? ? ?static if (i > 0) result ~= toStringSeparator;
>> ? ? ? ? ? ?static if (is(typeof(to!string(field[i]))))
>> <------------ this is calls to!()
>> ? ? ? ? ? ? ? ?app.put(to!string(field[i]));
>> ------------
>>
>> And that's all I have time for. I think this should fixed before the
>> release goes out -- it's a pretty nasty regression.
>> _______________________________________________
>> dmd-beta mailing list
>> dmd-beta at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>>
>>
>>
>
> _______________________________________________
> dmd-beta mailing list
> dmd-beta at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>
April 08, 2010
I think this might be a latent compiler bug which has just been
exposed. While evaluating a template constraint, if there's a bad
parameter in a function call, you get a function parameter of value
__error, which can never be resolved.
Here's a patch.

expression.c, line 6833.


    arguments = arrayExpressionSemantic(arguments, sc);

+    // If there was an error processing any argument,
+    // return an error without trying to resolve the function call.
+    if (arguments && arguments->dim)
+    {
+        for (int k = 0; k < arguments->dim; k++)
+        {   Expression *checkarg = (Expression *)arguments->data[k];
+            if (checkarg->op == TOKerror)
+                return checkarg;
+        }
+    }
    preFunctionParameters(loc, sc, arguments);


On 8 April 2010 05:29, Don Clugston <dclugston at googlemail.com> wrote:
> Further reduced test case:
>
> import std.typecons;
>
> struct V {
> ? ? ?void * p[1];
> }
>
> alias Tuple!(V) crash;
>
> It seems to be related to the use of void *. (If you make V just struct V { void *p;} ?it will still crash, but it's harder to debug).
>
>
>
> On 8 April 2010 00:32, Walter Bright <walter at digitalmars.com> wrote:
>> Hmm, nothing jumps out as obviously wrong there, though it clearly has something to do with the .init. It should perhaps use .init[0] instead.
>>
>> Don Clugston wrote:
>>>>>
>>>>> (2) I'm working on tracking down the Phobos unittest stack overflow. It seems to be a regression. I've cut it down to this test case:
>>>>> ---
>>>>> import std.variant;
>>>>> import std.typecons;
>>>>>
>>>>> alias Tuple!(Variant) crash;
>>>>> ---
>>>>> There have been no relevant changes to Phobos. I'm still working on it.
>>>>>
>>>>
>>>> It compiled in DMD svn 421, and fails in svn 423. It's caused by the ".init property for static arrays is now an array literal." change.
>>>>
>>>
>>> Here's the problem:
>>>
>>> conv.d, ?line 260:
>>> /**
>>> For structs that do not define $(D toString), the conversion to string
>>> produces the list of fields.
>>> ?*/
>>> T to(T, S)(S s, in T left = S.stringof~"(", in T separator = ", ",
>>> ? ? ? ?in T right = ")")
>>> if (is(S == struct) && isSomeString!(T) && !is(typeof(&S.init.toString)))
>>> {
>>> ? ?Tuple!(FieldTypeTuple!(S)) * t = void; ? ? // < ---------- Creates a
>>> Tuple
>>> ----------
>>> and Tuple contains toString, defined in typecons.d line 435:
>>>
>>> ? ?string toString()
>>> ? ?{
>>> ? ? ? ?char[] result;
>>> ? ? ? ?auto app = appender(&result);
>>> ? ? ? ?app.put(toStringHeader);
>>> ? ? ? ?foreach (i, Unused; noStrings!(T).Result)
>>> ? ? ? ?{
>>> ? ? ? ? ? ?static if (i > 0) result ~= toStringSeparator;
>>> ? ? ? ? ? ?static if (is(typeof(to!string(field[i]))))
>>> <------------ this is calls to!()
>>> ? ? ? ? ? ? ? ?app.put(to!string(field[i]));
>>> ------------
>>>
>>> And that's all I have time for. I think this should fixed before the
>>> release goes out -- it's a pretty nasty regression.
>>> _______________________________________________
>>> dmd-beta mailing list
>>> dmd-beta at puremagic.com
>>> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>>>
>>>
>>>
>>
>> _______________________________________________
>> dmd-beta mailing list
>> dmd-beta at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>>
>
1 2
Next ›   Last »