Thread overview
the new GC might be buggy
Jan 24, 2007
Thomas Kuehne
Jan 24, 2007
Lionello Lunesu
Jan 24, 2007
Thomas Kuehne
Jan 24, 2007
Derek Parnell
January 24, 2007
While updating Flectioned to DMD-1.001 I've encountered a _potential_ issue with the new GC.

# class LazyTypeInfo : TypeInfo{
#    char[] unique;
#
#    this(char[] name){
#       this.unique = name.dup;
#       printf("LAZY_1: this:%p message:%p %.*s\n", this, unique.ptr,
#       unique);
#    }
#
#    char[] toString(){
#       printf("LAZY_2: this:%p message:%p %.*s\n", this, unique.ptr, unique);
#       return format("LazyTypeInfo(%s)", unique);
#    }
# }

No LazyTypeInfo can be collected before all LazyTypeInfos have been instantiated and all instantiations of LazyTypeInfo are plain "new LazyTypeInfo("some string)".

LAZY_1: this:0xf7d57170 message:0xf7d57140 aaA.AA
LAZY_1: this:0xf7d57140 message:0xf7d26640 std.asserterror.AssertError
LAZY_2: this:0xf7d57140 message:0xf7d26640

As you can see 0xf7d57140 first points to the content of an array and later on to that of a LazyTypeInfo instance. In addition the above "name.dup" was a "name" in previous versions and works with DMD-1.00 and GDC-0.21.

Complete source: http://svn.dsource.org/projects/flectioned/downloads/flectioned.zip

failure detection:
Error: 4invalid UTF-8 sequence

I'll try to reduce the code a bit before filling a bug report - if it is indeed a D issue.

Thomas


January 24, 2007
Thomas Kuehne wrote:
> I'll try to reduce the code a bit before filling a bug report - if it is
> indeed a D issue.

You're not alone. I'm getting strange results using std.string.split (which wasn't changed) and Oskar's got segfaults :(

L.
January 24, 2007
Thomas Kuehne schrieb am 2007-01-24:
>
> While updating Flectioned to DMD-1.001 I've encountered a _potential_ issue with the new GC.
[...]

It is indeed a D issue Oskar Linde already tracked down.

news:ep6asn$aer$1@digitaldaemon.com:
> It seems the ClassInfo.flags are incorrectly set to 2 when only private data members contain pointers.

Thomas

January 24, 2007
On Wed, 24 Jan 2007 11:49:42 +0000 (UTC), Thomas Kuehne wrote:


> Error: 4invalid UTF-8 sequence

I'm also getting this when compiling 'Build' with 1.001. A recompile with DMD 1.00 works fine though.

-- 
Derek Parnell