www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Beta List

reply Jonathan M Davis <jmdavisProg gmx.com> writes:
Just a reminder in case you didn't know, but there is a beta list (dmd-beta) 
for posting and discussing beta releases of dmd prior to actual releases. It's 
not a particularly active list, since we only get betas every couple of months 
or so, but if you want to check out beta releases of dmd, check out the list. 
We encourage folks to try out the betas so that we can catch any regressions 
that we might have missed or anything else which might need to be fixed before 
we can make the release final.

The beta for the next release has been now been posted, so you can head over 
to dmd-beta and check it out if you'd like.

- Jonathan M Davis
May 06 2011
next sibling parent reply bearophile <bearophileHUGS lycos.com> writes:
Jonathan M Davis:

 Just a reminder in case you didn't know, but there is a beta list (dmd-beta) 
 for posting and discussing beta releases of dmd prior to actual releases.
I am not yet a subscriber there. Here are some notes on 2.053beta. This little program: int foo(int x, int y) { return x / y; } void main() { foo(1, 0); } Produces the stack trace: object.Error: Integer Divide by Zero ---------------- ...\test.d(5): _Dmain ---------------- While this similar Python2 program: def foo(x, y): return x / y def main(): foo(1, 0) main() Gives the stacktrace (feel fee to ignore the first global call to main()): Traceback (most recent call last): File "...\temp.py", line 5, in <module> main() File "...\temp.py", line 4, in main foo(1, 0) File "...\temp.py", line 2, in foo return x / y ZeroDivisionError: integer division or modulo by zero On Python the stacktrace is reversed compared to the D one, maybe this is better. And as first line it prints this, that's useful for D too: Traceback (most recent call last): And the Python stacktrace shows the line/function where the division by zero happens too, instead of just all the frames of the functions up to the one that has called the function that has generated the division by zero. I'd like to see foo() too in the D stacktrace. ---------------------------------- Bugzilla 1330 is fixed, I have done a little CTFE benchmark: import std.c.stdio; size_t counter(size_t v) { size_t c; for (c = 0; v; c++) v &= v - 1; // clear the least significant bit set return c; } int[] tabler(int n) { int[] result = new int[n]; foreach (i, ref x; result) x = counter(i); return result; } const int N = 4000; const int[] t = tabler(N); void main() { for (size_t i = N - 5; i < N; i++) printf("%u %u\n", i, t[i]); } Results: 2.052: 0.78 seconds, about 70 MB committed. 2.053beta: 1.56 seconds, about 140 MB committed. ---------------------------------- The traits.html docs don't seem to contain the new "parent". ---------------------------------- This little program: import std.stdio, std.container; void main() { auto t = redBlackTree(0, 7, 5, 2); writeln(t); writeln(t[]); } Prints: std.container.RedBlackTree!(int).RedBlackTree [0, 2, 5, 7] But I'd like one of the two (the first, if possible) to print instead: redBlackTree(0, 2, 5, 7) ---------------------------------- This line is present two times in the changelog: Added parent to __traits for QtD support ---------------------------------- Regarding this bug: http://d.puremagic.com/issues/show_bug.cgi?id=4298 This little program: enum int[] arr = [1, 2, 3]; void main() { assert(arr.ptr == arr.ptr); } Generates this asm: __Dmain comdat L0: push EAX mov EAX,offset FLAT:_D11TypeInfo_Ai6__initZ push EBX push ESI push 3 push 2 push 1 push 3 push EAX call near ptr __d_arrayliteralT add ESP,014h mov ECX,EAX push ECX sub ESP,4 mov EDX,offset FLAT:_D11TypeInfo_Ai6__initZ push 3 mov EBX,3 push 2 push 1 push 3 push EDX call near ptr __d_arrayliteralT mov ECX,EAX add ESP,014h add ESP,4 mov ESI,ECX mov EAX,3 pop ECX cmp ECX,ESI je L55 mov EAX,3 call near ptr _D4test8__assertFiZv L55: xor EAX,EAX pop ESI pop EBX pop ECX ret ---------------------------------- Bye, bearophile
May 07 2011
parent reply KennyTM~ <kennytm gmail.com> writes:
On May 7, 11 18:54, bearophile wrote:
 Jonathan M Davis:

 Just a reminder in case you didn't know, but there is a beta list (dmd-beta)
 for posting and discussing beta releases of dmd prior to actual releases.
I am not yet a subscriber there. Here are some notes on 2.053beta. This little program: int foo(int x, int y) { return x / y; } void main() { foo(1, 0); } Produces the stack trace: object.Error: Integer Divide by Zero ---------------- ...\test.d(5): _Dmain ----------------
Oh, what flags have you passed to DMD? I can only get a "Floating point exception" on OS X, which is, well, expected as it's the CPU that catches the integer-divide-by-zero error, not the language. The stack trace can be read by the debugger. Throwing an exception manually does produce a stack trace up to 'foo', just like Python (which traps divide-by-zero in the language).
May 07 2011
parent bearophile <bearophileHUGS lycos.com> writes:
KennyTM~:

 Oh, what flags have you passed to DMD?
-w -g, Windows Vista.
 I can only get a "Floating point 
 exception" on OS X, which is, well, expected as it's the CPU that 
 catches the integer-divide-by-zero error, not the language.
Right, I am sorry. Bye, bearophile
May 07 2011
prev sibling parent reply David Bryant <bagnose gmail.com> writes:
Ok, I gave the latest 2.053 beta a try (dated 12 May) and am running 
into some new problems. This code ran successfully with older versions 
of dmd2, but now it fails most of the time with exceptions from within 
threads. Here are some example backtraces:

Thread died unexpectedly: 
%score.thread.ThreadException src/core/thread.d(2338): Unable to suspend 
thread
----------------
./.bob/bob(extern (C) void core.thread.thread_suspendAll().void 
suspend(core.thread.Thread)+0x86) [0x80f5d7a]
./.bob/bob(thread_suspendAll+0x7f) [0x80f5cdf]
./.bob/bob(uint gc.gcx.Gcx.fullcollect(void*)+0x14) [0x80ed6c0]
./.bob/bob(uint gc.gcx.Gcx.fullcollectshell()+0x26) [0x80ed69e]
./.bob/bob(void* gc.gcx.Gcx.bigAlloc(uint, gc.gcx.Pool**, uint*)+0x8a) 
[0x80ed226]
./.bob/bob(void* gc.gcx.GC.mallocNoSync(uint, uint, uint*)+0x11d) 
[0x80eb9ed]
./.bob/bob(void* gc.gcx.GC.malloc(uint, uint, uint*)+0x4b) [0x80eb8a3]
./.bob/bob(gc_malloc+0x1e) [0x80cb4ae]
./.bob/bob(void* core.memory.GC.malloc(uint, uint)+0xf) [0x80c8173]
./.bob/bob(void[] std.file.read(const(char[]), const(uint))+0xc2) 
[0x80dc972]
./.bob/bob(immutable(char)[] 
std.file.readText!(immutable(char)[]).readText(const(char[]))+0x16) 
[0x80bdfd6]
./.bob/bob(void bob.read_options()+0x73) [0x80b46f3]
... < SNIP >

Thread died unexpectedly: %sobject.Error: Got signal 11 SIGSEGV
----------------
./.bob/bob(signalHandler+0x4f) [0x80c5abb]
[0x33f400]
./.bob/bob(gc.gcx.BlkInfo gc.gcx.GC.queryNoSync(void*)+0x17) [0x80ec493]
./.bob/bob(gc.gcx.BlkInfo gc.gcx.GC.query(void*)+0x80) [0x80ec448]
./.bob/bob(gc_query+0x26) [0x80cb6f6]
./.bob/bob(_d_arrayappendcTX+0x5e) [0x80ce19e]
./.bob/bob(_d_arrayappendT+0x2a) [0x80ce09a]
./.bob/bob(bob.Obj bob.Obj.__ctor(bob.Unit, bob.File, immutable(char)[], 
bob.DynamicLib[], bob.StaticLib[])+0x177) [0x80b7393]
./.bob/bob(bob.Obj bob.Obj.__ctor(bob.Unit, immutable(char)[], 
immutable(char)[], bob.DynamicLib[], bob.StaticLib[])+0xc7) [0x80b75
... < SNIP >

I hope this may be of some help.

Regards,
Dave

On 07/05/11 14:46, Jonathan M Davis wrote:
 Just a reminder in case you didn't know, but there is a beta list (dmd-beta)
 for posting and discussing beta releases of dmd prior to actual releases. It's
 not a particularly active list, since we only get betas every couple of months
 or so, but if you want to check out beta releases of dmd, check out the list.
 We encourage folks to try out the betas so that we can catch any regressions
 that we might have missed or anything else which might need to be fixed before
 we can make the release final.

 The beta for the next release has been now been posted, so you can head over
 to dmd-beta and check it out if you'd like.

 - Jonathan M Davis
May 12 2011
parent Stephan <spam extrawurst.org> writes:
Can you file a bug report on bugzilla and at post it on the dmd-beta 
mailing list, so that it gets recognized ?

Stephan

On 12.05.2011 11:03, David Bryant wrote:
 Ok, I gave the latest 2.053 beta a try (dated 12 May) and am running
 into some new problems. This code ran successfully with older versions
 of dmd2, but now it fails most of the time with exceptions from within
 threads. Here are some example backtraces:

 Thread died unexpectedly:
 %score.thread.ThreadException src/core/thread.d(2338): Unable to suspend
 thread
 ----------------
 ./.bob/bob(extern (C) void core.thread.thread_suspendAll().void
 suspend(core.thread.Thread)+0x86) [0x80f5d7a]
 ./.bob/bob(thread_suspendAll+0x7f) [0x80f5cdf]
 ./.bob/bob(uint gc.gcx.Gcx.fullcollect(void*)+0x14) [0x80ed6c0]
 ./.bob/bob(uint gc.gcx.Gcx.fullcollectshell()+0x26) [0x80ed69e]
 ./.bob/bob(void* gc.gcx.Gcx.bigAlloc(uint, gc.gcx.Pool**, uint*)+0x8a)
 [0x80ed226]
 ./.bob/bob(void* gc.gcx.GC.mallocNoSync(uint, uint, uint*)+0x11d)
 [0x80eb9ed]
 ./.bob/bob(void* gc.gcx.GC.malloc(uint, uint, uint*)+0x4b) [0x80eb8a3]
 ./.bob/bob(gc_malloc+0x1e) [0x80cb4ae]
 ./.bob/bob(void* core.memory.GC.malloc(uint, uint)+0xf) [0x80c8173]
 ./.bob/bob(void[] std.file.read(const(char[]), const(uint))+0xc2)
 [0x80dc972]
 ./.bob/bob(immutable(char)[]
 std.file.readText!(immutable(char)[]).readText(const(char[]))+0x16)
 [0x80bdfd6]
 ./.bob/bob(void bob.read_options()+0x73) [0x80b46f3]
 ... < SNIP >

 Thread died unexpectedly: %sobject.Error: Got signal 11 SIGSEGV
 ----------------
 ./.bob/bob(signalHandler+0x4f) [0x80c5abb]
 [0x33f400]
 ./.bob/bob(gc.gcx.BlkInfo gc.gcx.GC.queryNoSync(void*)+0x17) [0x80ec493]
 ./.bob/bob(gc.gcx.BlkInfo gc.gcx.GC.query(void*)+0x80) [0x80ec448]
 ./.bob/bob(gc_query+0x26) [0x80cb6f6]
 ./.bob/bob(_d_arrayappendcTX+0x5e) [0x80ce19e]
 ./.bob/bob(_d_arrayappendT+0x2a) [0x80ce09a]
 ./.bob/bob(bob.Obj bob.Obj.__ctor(bob.Unit, bob.File, immutable(char)[],
 bob.DynamicLib[], bob.StaticLib[])+0x177) [0x80b7393]
 ./.bob/bob(bob.Obj bob.Obj.__ctor(bob.Unit, immutable(char)[],
 immutable(char)[], bob.DynamicLib[], bob.StaticLib[])+0xc7) [0x80b75
 ... < SNIP >

 I hope this may be of some help.

 Regards,
 Dave

 On 07/05/11 14:46, Jonathan M Davis wrote:
 Just a reminder in case you didn't know, but there is a beta list
 (dmd-beta)
 for posting and discussing beta releases of dmd prior to actual
 releases. It's
 not a particularly active list, since we only get betas every couple
 of months
 or so, but if you want to check out beta releases of dmd, check out
 the list.
 We encourage folks to try out the betas so that we can catch any
 regressions
 that we might have missed or anything else which might need to be
 fixed before
 we can make the release final.

 The beta for the next release has been now been posted, so you can
 head over
 to dmd-beta and check it out if you'd like.

 - Jonathan M Davis
May 12 2011