www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - seg-v in 4 lines (DMD 0.160 Linux/XP)

reply BCS <BCS pathlink.com> writes:
<code>
void main()
{
	switch(1)
	{
//		case 0:	// compiles with this line
			scope(exit) *cast(int*)null = 0;
		default:
	}
}
</code>

C:\...>dmd -v seg_v_1.d
parse     seg_v_1
semantic  seg_v_1
semantic2 seg_v_1
semantic3 seg_v_1
code      seg_v_1
generating code for function 'main'

seg-v
Jun 16 2006
parent reply Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

BCS schrieb am 2006-06-16:
<code>
 void main()
 {
 	switch(1)
 	{
 //		case 0:	// compiles with this line
 			scope(exit) *cast(int*)null = 0;
 		default:
 	}
 }
</code>

 C:\...>dmd -v seg_v_1.d
 parse     seg_v_1
 semantic  seg_v_1
 semantic2 seg_v_1
 semantic3 seg_v_1
 code      seg_v_1
 generating code for function 'main'

 seg-v

Added to DStress as http://dstress.kuehne.cn/run/s/switch_22_A.d http://dstress.kuehne.cn/run/s/switch_22_B.d http://dstress.kuehne.cn/run/s/switch_22_C.d http://dstress.kuehne.cn/run/s/switch_22_D.d http://dstress.kuehne.cn/run/s/switch_22_E.d http://dstress.kuehne.cn/run/s/switch_22_F.d http://dstress.kuehne.cn/run/s/switch_22_G.d http://dstress.kuehne.cn/run/s/switch_22_I.d http://dstress.kuehne.cn/run/s/switch_22_J.d switch_22_A is nasty:
 ==10236== Conditional jump or move depends on uninitialised value(s)
 ==10236==    at 0x804A0D3: _Dmain (run/s/switch_22_A.d:17)
 ==10236==    by 0x804B2BE: main (in ./run/s/switch_22_A.d.exe)

Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFEom6x3w+/yD4P9tIRAiYNAKCckRCza4STsjInkSV0ujAL271AZgCgujaS Tmln4AOT/jL3YVPOHb1M6UA= =lJ7R -----END PGP SIGNATURE-----
Jun 29 2006
next sibling parent reply BCS <BCS pathlink.com> writes:
404:

Thomas Kuehne wrote:
 
 
 Added to DStress as
 http://dstress.kuehne.cn/run/s/switch_22_A.d
 http://dstress.kuehne.cn/run/s/switch_22_B.d
 http://dstress.kuehne.cn/run/s/switch_22_C.d
 http://dstress.kuehne.cn/run/s/switch_22_D.d
 http://dstress.kuehne.cn/run/s/switch_22_E.d
 http://dstress.kuehne.cn/run/s/switch_22_F.d
 http://dstress.kuehne.cn/run/s/switch_22_G.d
 http://dstress.kuehne.cn/run/s/switch_22_I.d
 http://dstress.kuehne.cn/run/s/switch_22_J.d
 

 Added to DStress as
 http://dstress.kuehne.cn/compile/m/mangelof_16_A.d
 http://dstress.kuehne.cn/compile/m/mangelof_16_B.d
 http://dstress.kuehne.cn/compile/m/mangelof_16_C.d
 http://dstress.kuehne.cn/compile/m/mangelof_16_D.d
 http://dstress.kuehne.cn/compile/m/mangelof_16_E.d
 http://dstress.kuehne.cn/compile/m/mangelof_16_F.d
 http://dstress.kuehne.cn/compile/m/mangelof_16_G.d
 http://dstress.kuehne.cn/compile/m/mangelof_16_H.d

http://dstress.kuehne.cn/.../a/asm_cvtpd2pi_01_A.d http://dstress.kuehne.cn/.../a/asm_cvtpi2pd_01_A.d http://dstress.kuehne.cn/.../a/asm_cvtpi2ps_01_A.d http://dstress.kuehne.cn/.../a/asm_cvtps2pi_01_A.d http://dstress.kuehne.cn/.../a/asm_cvttpd2pi_01_A.d http://dstress.kuehne.cn/.../a/asm_cvttps2pi_01_A.d http://dstress.kuehne.cn/.../c/command_line_null_source_03 http://dstress.kuehne.cn/.../l/linking_01 http://dstress.kuehne.cn/.../s/struct_24_C.d http://dstress.kuehne.cn/.../t/typeinfo_init_01 http://dstress.kuehne.cn/.../t/typeinfo_init_02 http://dstress.kuehne.cn/.../u/unittest_09_C
Jun 29 2006
parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

BCS schrieb am 2006-06-29:
 404:

 Thomas Kuehne wrote:
 
 
 Added to DStress as
 http://dstress.kuehne.cn/run/s/switch_22_A.d
 http://dstress.kuehne.cn/run/s/switch_22_B.d
 http://dstress.kuehne.cn/run/s/switch_22_C.d
 http://dstress.kuehne.cn/run/s/switch_22_D.d
 http://dstress.kuehne.cn/run/s/switch_22_E.d
 http://dstress.kuehne.cn/run/s/switch_22_F.d
 http://dstress.kuehne.cn/run/s/switch_22_G.d
 http://dstress.kuehne.cn/run/s/switch_22_I.d
 http://dstress.kuehne.cn/run/s/switch_22_J.d


fixed
 Added to DStress as
 http://dstress.kuehne.cn/compile/m/mangelof_16_A.d
 http://dstress.kuehne.cn/compile/m/mangelof_16_B.d
 http://dstress.kuehne.cn/compile/m/mangelof_16_C.d
 http://dstress.kuehne.cn/compile/m/mangelof_16_D.d
 http://dstress.kuehne.cn/compile/m/mangelof_16_E.d
 http://dstress.kuehne.cn/compile/m/mangelof_16_F.d
 http://dstress.kuehne.cn/compile/m/mangelof_16_G.d
 http://dstress.kuehne.cn/compile/m/mangelof_16_H.d


typo: http://dstress.kuehne.cn/compile/m/mangleof_16_A.d http://dstress.kuehne.cn/compile/m/mangleof_16_B.d http://dstress.kuehne.cn/compile/m/mangleof_16_C.d http://dstress.kuehne.cn/compile/m/mangleof_16_D.d http://dstress.kuehne.cn/compile/m/mangleof_16_E.d http://dstress.kuehne.cn/compile/m/mangleof_16_F.d http://dstress.kuehne.cn/compile/m/mangleof_16_G.d http://dstress.kuehne.cn/compile/m/mangleof_16_H.d
 http://dstress.kuehne.cn/.../a/asm_cvtpd2pi_01_A.d
 http://dstress.kuehne.cn/.../a/asm_cvtpi2pd_01_A.d
 http://dstress.kuehne.cn/.../a/asm_cvtpi2ps_01_A.d
 http://dstress.kuehne.cn/.../a/asm_cvtps2pi_01_A.d
 http://dstress.kuehne.cn/.../a/asm_cvttpd2pi_01_A.d
 http://dstress.kuehne.cn/.../a/asm_cvttps2pi_01_A.d
 http://dstress.kuehne.cn/.../c/command_line_null_source_03
 http://dstress.kuehne.cn/.../l/linking_01
 http://dstress.kuehne.cn/.../s/struct_24_C.d
 http://dstress.kuehne.cn/.../t/typeinfo_init_01
 http://dstress.kuehne.cn/.../t/typeinfo_init_02
 http://dstress.kuehne.cn/.../u/unittest_09_C

Those listed above are results from moving/renaming/deleting and will vanish when new result pages are generated. Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFEpDny3w+/yD4P9tIRAomGAJ9L8Q4veQiLneq9nu0lBJ76hZeuiQCfcrDy G/UaOdfmS9EJ4cAx5/OdC7E= =B5Tk -----END PGP SIGNATURE-----
Jun 29 2006
prev sibling parent reply BCS <BCS pathlink.com> writes:
Thomas Kuehne wrote:
 
 
 Added to DStress as
 http://dstress.kuehne.cn/run/s/switch_22_A.d
 http://dstress.kuehne.cn/run/s/switch_22_B.d
 http://dstress.kuehne.cn/run/s/switch_22_C.d
 http://dstress.kuehne.cn/run/s/switch_22_D.d
 http://dstress.kuehne.cn/run/s/switch_22_E.d
 http://dstress.kuehne.cn/run/s/switch_22_F.d
 http://dstress.kuehne.cn/run/s/switch_22_G.d
 http://dstress.kuehne.cn/run/s/switch_22_I.d
 http://dstress.kuehne.cn/run/s/switch_22_J.d
 

"It is illegal for a GotoStatement to be used to skip initializations." How does this effect the legality of these test cases. For that matter how do I determine if a test case is considered to be legal? I would expect that "A" would be illegal because of this. I think that the actions of the rest are not specified.
Jun 29 2006
parent reply Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

BCS schrieb am 2006-06-29:
 Thomas Kuehne wrote:
 
 
 Added to DStress as
 http://dstress.kuehne.cn/run/s/switch_22_A.d
 http://dstress.kuehne.cn/run/s/switch_22_B.d
 http://dstress.kuehne.cn/run/s/switch_22_C.d
 http://dstress.kuehne.cn/run/s/switch_22_D.d
 http://dstress.kuehne.cn/run/s/switch_22_E.d
 http://dstress.kuehne.cn/run/s/switch_22_F.d
 http://dstress.kuehne.cn/run/s/switch_22_G.d
 http://dstress.kuehne.cn/run/s/switch_22_I.d
 http://dstress.kuehne.cn/run/s/switch_22_J.d
 

"It is illegal for a GotoStatement to be used to skip initializations." How does this effect the legality of these test cases. For that matter how do I determine if a test case is considered to be legal?

legal: http://dstress.kuehne.cn/compile/ http://dstress.kuehne.cn/run/ illegal: http://dstress.kuehne.cn/nocompile/ http://dstress.kuehne.cn/norun/ Those in http://dstress.kuehne.cn/complex/ are "complex" tests.
 I would expect that "A" would be illegal because of this.

 I think that the actions of the rest are not specified.

Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFEpN5U3w+/yD4P9tIRAlLTAKCd2CG5xMbjRspuWbxVi/LSC4OvcgCbBnmF oMUvbqKvKJassPUPMaEHh3g= =PNrH -----END PGP SIGNATURE-----
Jun 30 2006
parent BCS <BCS pathlink.com> writes:
Thomas Kuehne wrote:
 BCS schrieb am 2006-06-29:

I think that the actions of the rest are not specified.

Replace scope with writefln("activate scope X"); and analyse again.

<code> import std.stdio; void main() { goto skip; scope(exit) head: writef("exit\n"); skip: writef("exiting\n"); } </code> scope.d(6): cannot goto forward into different try block level Yet the latter test cases allow the skipping of scope statements using a switch. OTOH the scope statements do get executed as if they weren't skipped. Both of these actions are, as far as I can tell, undocumented. I don't know what should be the defined action but this just seems odd.
Jun 30 2006