[Bug 72] New: valgrind: use of unitialized values in the gcx module

Thomas Kuehne thomas-dloop at kuehne.cn
Fri Mar 31 06:35:24 PST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Brad Roberts schrieb am 2006-03-25:
> Which file(s) in phobos triggers this?  I'll create a minimalized test 
> case.

The code below triggers the _D6gcbits6GCBits3setFkZv issue.

Phobos compiled without "-release":
2 x Conditional jump or move depends on uninitialised value
2 x Use of uninitialised value of size 4

Phobos compiled with "-release":
2 x Use of uninitialised value of size 4

> int main(){
>	char[] dummy;
>	dummy = "abc".dup;
>	for(int a=0; a < 120; a++){
>		char[] tmp = new char[a % 80];
>		for(int b=0; b  < a % 10; b++){
>			dummy = dummy[0 .. $ % 33] ~ tmp[0 .. $ % 11] ~ dummy[ $ % 33 .. $];
>		}
>	}
>	return dummy.length / 2000002;
> }

Setting: DMD-0.150 / Linux / Valgrind-3.1.1

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFELUuJ3w+/yD4P9tIRAgiZAJ4+F+4Tso6NHhIdemX2s/05b/X7WwCeNVVD
OtbaOUNFuyavZggkxBGBbIw=
=bR0O
-----END PGP SIGNATURE-----



More information about the Digitalmars-d-bugs mailing list