hack on @safe functions

Pavel phondogo at gmail.com
Mon Feb 3 04:41:29 PST 2014


struct T {
	ubyte[0x12FDB5/*address of local x in main + 1*/] x;
}

@safe void test() {
	T* t = null;
	t.x[$-1] = 99;
}

void main() {
	ubyte x = 0;
	writeln("\n", &x, ' ', x);
	test();
	writeln("\n", x);
}


More information about the Digitalmars-d mailing list