www.digitalmars.com         C & C++   DMDScript  

DMDScript - DMDScript completely broken

reply Anomymous Coward <anon coward.net> writes:
The problem:

I built the 'ds' program and tried to compile "sieve.ds" with it. The
result was a segmentation fault. I recompiled in debug mode and tried
again, using a debugger this time. An assertion was triggered at
value.d:717:

	(gdb) list
	712		    case V_OBJECT:
	713			if (v.object == object)
	714			    return 0;
	715			break;
	716		    default:
	717			assert(0);
	718		}
	719		return -1;
	720	    }
	721	

The switch is testing against the variable this.vtype, whose
value turns out to be 0 (V_NONE), which is not tested for by
the switch. The complete value of "this" was:

	(gdb) print *this
	$12 = {vtype = 0 '\0', hash = 0, dbool = 0, number = 0,
	       string = {length = 0, ptr = 0x0},
	       object =  0x0, int32 = 0, uint32 = 0, uint16 = 0, iter = 0x0}

Some information about the host system: 

OS: Debian Lenny (stable). 


Aug 31 00:24:01 UTC 2007 i686 GNU/Linux

D Compiler: gdc (GCC) 4.1.3 20080623 (prerelease gdc 0.25 20080419,
using dmd 1.024) (Debian 0.25-20080616-4.1.2-23.2) Copyright (C) 2006

DMDScript version: UNKNOWN (downloaded today from
http://ftp.digitalmars.com/dmdscript.zip).
Jun 17 2009
parent Alan Knowles <alan akbkhome.com> writes:
Please try my fork of DMDScript - It's used quite a bit, as I've written 
a JS compresser / documenter with it.

http://www.akbkhome.com/svn/rooscript/

I do remember this bug a while back, cant' remember the fix, but I think 
it's fixed in rooscript.

Regards
Alan

Anomymous Coward wrote:
 The problem:
 
 I built the 'ds' program and tried to compile "sieve.ds" with it. The
 result was a segmentation fault. I recompiled in debug mode and tried
 again, using a debugger this time. An assertion was triggered at
 value.d:717:
 
 	(gdb) list
 	712		    case V_OBJECT:
 	713			if (v.object == object)
 	714			    return 0;
 	715			break;
 	716		    default:
 	717			assert(0);
 	718		}
 	719		return -1;
 	720	    }
 	721	
 
 The switch is testing against the variable this.vtype, whose
 value turns out to be 0 (V_NONE), which is not tested for by
 the switch. The complete value of "this" was:
 
 	(gdb) print *this
 	$12 = {vtype = 0 '\0', hash = 0, dbool = 0, number = 0,
 	       string = {length = 0, ptr = 0x0},
 	       object =  0x0, int32 = 0, uint32 = 0, uint16 = 0, iter = 0x0}
 
 Some information about the host system: 
 
 OS: Debian Lenny (stable). 
 

 Aug 31 00:24:01 UTC 2007 i686 GNU/Linux
 
 D Compiler: gdc (GCC) 4.1.3 20080623 (prerelease gdc 0.25 20080419,
 using dmd 1.024) (Debian 0.25-20080616-4.1.2-23.2) Copyright (C) 2006
 
 DMDScript version: UNKNOWN (downloaded today from
 http://ftp.digitalmars.com/dmdscript.zip).
 
Jun 18 2009