digitalmars.D.bugs - roll-up of old bugs: compiler GPF on vararg code
- Sean Kelly (39/39) Jan 24 2006 C:\code\d\bugs>type 101_7.d
- Thomas Kuehne (10/49) Jan 25 2006 -----BEGIN PGP SIGNED MESSAGE-----
- Deewiant (2/67) Jan 25 2006 Nor I, on Windows. Compiled and ran fine in both DMD 0.142 and 0.144.
- Sean Kelly (14/77) Jan 25 2006 Weird. It even crashes DMD if I remove the stdio import and printf call,...
- Sean Kelly (3/3) Jan 25 2006 I was wrong, Ares is the cause. It appears that DMD has begun to
C:\code\d\bugs>type 101_7.d // this code causes a compiler GPF import std.c.stdio; void ptype( ... ) { printf( "%.*s (%.*s)\n", _arguments[0].classinfo.name, _arguments[0].classin fo.base.name ); } class C {} void main() { char[] ca; wchar[] wa; dchar[] da; char* cp; wchar* wp; dchar* dp; ptype( ca ); ptype( wa ); ptype( da ); ptype( cp ); ptype( wp ); ptype( dp ); ptype( &ca ); ptype( &wa ); ptype( &da ); int i; float f; ptype( i ); ptype( f ); C c = new C(); ptype( c ); long l; ptype( l ); void fn() {} ptype( &fn ); } C:\code\d\bugs>dmd 101_7
Jan 24 2006
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Sean Kelly schrieb am 2006-01-24:C:\code\d\bugs>type 101_7.d // this code causes a compiler GPF import std.c.stdio; void ptype( ... ) { printf( "%.*s (%.*s)\n", _arguments[0].classinfo.name, _arguments[0].classin fo.base.name ); } class C {} void main() { char[] ca; wchar[] wa; dchar[] da; char* cp; wchar* wp; dchar* dp; ptype( ca ); ptype( wa ); ptype( da ); ptype( cp ); ptype( wp ); ptype( dp ); ptype( &ca ); ptype( &wa ); ptype( &da ); int i; float f; ptype( i ); ptype( f ); C c = new C(); ptype( c ); long l; ptype( l ); void fn() {} ptype( &fn ); } C:\code\d\bugs>dmd 101_7Can't reproduce this on Linux. Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFD1y7K3w+/yD4P9tIRArmtAKCCPqc89Mwye23tL48iDIcwYUc7tgCcDdAH JAEsS/kfW0Y/qlcsLfeFqJ4= =f0mM -----END PGP SIGNATURE-----
Jan 25 2006
Thomas Kuehne wrote:Sean Kelly schrieb am 2006-01-24:Nor I, on Windows. Compiled and ran fine in both DMD 0.142 and 0.144.Can't reproduce this on Linux. ThomasC:\code\d\bugs>type 101_7.d // this code causes a compiler GPF import std.c.stdio; void ptype( ... ) { printf( "%.*s (%.*s)\n", _arguments[0].classinfo.name, _arguments[0].classin fo.base.name ); } class C {} void main() { char[] ca; wchar[] wa; dchar[] da; char* cp; wchar* wp; dchar* dp; ptype( ca ); ptype( wa ); ptype( da ); ptype( cp ); ptype( wp ); ptype( dp ); ptype( &ca ); ptype( &wa ); ptype( &da ); int i; float f; ptype( i ); ptype( f ); C c = new C(); ptype( c ); long l; ptype( l ); void fn() {} ptype( &fn ); } C:\code\d\bugs>dmd 101_7
Jan 25 2006
Deewiant wrote:Thomas Kuehne wrote:Weird. It even crashes DMD if I remove the stdio import and printf call, which should eliminate Ares as the cause. This is with 0.144 for me. To me sure it wasn't a UTF issue, I retyped a trimmed down example into a different file. It seems like it's happening if I pass a pointer or class reference to a vararg function: void ptype( ... ) {} void main() { void fn() {} ptype( &fn ); } I'll reinstall DMD and go from there. SeanSean Kelly schrieb am 2006-01-24:Nor I, on Windows. Compiled and ran fine in both DMD 0.142 and 0.144.Can't reproduce this on Linux.C:\code\d\bugs>type 101_7.d // this code causes a compiler GPF import std.c.stdio; void ptype( ... ) { printf( "%.*s (%.*s)\n", _arguments[0].classinfo.name, _arguments[0].classin fo.base.name ); } class C {} void main() { char[] ca; wchar[] wa; dchar[] da; char* cp; wchar* wp; dchar* dp; ptype( ca ); ptype( wa ); ptype( da ); ptype( cp ); ptype( wp ); ptype( dp ); ptype( &ca ); ptype( &wa ); ptype( &da ); int i; float f; ptype( i ); ptype( f ); C c = new C(); ptype( c ); long l; ptype( l ); void fn() {} ptype( &fn ); } C:\code\d\bugs>dmd 101_7
Jan 25 2006
I was wrong, Ares is the cause. It appears that DMD has begun to require TypeInfo classes to be declared in object.d. I'll fix it on my end. Sean
Jan 25 2006