digitalmars.D.bugs - Strange DMD Assertion failure
- Chris Miller (13/13) Jun 22 2006 Compiling code that worked fine with DMD 0.160 now fails on DMD 0.161 wi...
- Walter Bright (2/16) Jun 23 2006 There's no way to track this down without a reproducible test case.
- Deewiant (2/19) Jun 23 2006 Have a look at Carlos Santander's post "ice returning a delegate".
- Bruno Medeiros (16/33) Jun 23 2006 template tpl() {
- Thomas Kuehne (13/25) Jun 29 2006 -----BEGIN PGP SIGNED MESSAGE-----
- Bruno Medeiros (5/41) Jul 01 2006 Seems this was fixed in DMD 162.
Compiling code that worked fine with DMD 0.160 now fails on DMD 0.161 with the following compiler error: Assertion failure: 'next' on line 2226 in file 'mtype.c' Looking at mtype.c I notice the assert makes sure 'next' is not null, but on the next line it checks 'next' for null and acts appropriately; also, in the same function of DMD 0.160 this null check is not there, only the assert, so it leads me to believe that perhaps the new compiler now allows a null 'next' but the assert was left accidentally. I tried simplifying my code to make a small reproducable example, but this project is huge and the changes were causing template mixin forward reference errors. Compiling with -v shows it fails on the first semantic pass. - Chris
Jun 22 2006
Chris Miller wrote:Compiling code that worked fine with DMD 0.160 now fails on DMD 0.161 with the following compiler error: Assertion failure: 'next' on line 2226 in file 'mtype.c' Looking at mtype.c I notice the assert makes sure 'next' is not null, but on the next line it checks 'next' for null and acts appropriately; also, in the same function of DMD 0.160 this null check is not there, only the assert, so it leads me to believe that perhaps the new compiler now allows a null 'next' but the assert was left accidentally. I tried simplifying my code to make a small reproducable example, but this project is huge and the changes were causing template mixin forward reference errors. Compiling with -v shows it fails on the first semantic pass.There's no way to track this down without a reproducible test case.
Jun 23 2006
Walter Bright wrote:Chris Miller wrote:Have a look at Carlos Santander's post "ice returning a delegate".Compiling code that worked fine with DMD 0.160 now fails on DMD 0.161 with the following compiler error: Assertion failure: 'next' on line 2226 in file 'mtype.c' Looking at mtype.c I notice the assert makes sure 'next' is not null, but on the next line it checks 'next' for null and acts appropriately; also, in the same function of DMD 0.160 this null check is not there, only the assert, so it leads me to believe that perhaps the new compiler now allows a null 'next' but the assert was left accidentally. I tried simplifying my code to make a small reproducable example, but this project is huge and the changes were causing template mixin forward reference errors. Compiling with -v shows it fails on the first semantic pass.There's no way to track this down without a reproducible test case.
Jun 23 2006
Walter Bright wrote:Chris Miller wrote:template tpl() { typeof( {} ) foo; } int main(char[][] args) { tpl!(); return 0; } » Assertion failure: 'next' on line 2226 in file 'mtype.c' Not sure if this is the same as bug 220, since that one asserts on a different line (altough on the same file), and the test case seems different. -- Bruno Medeiros - CS/E student http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#DCompiling code that worked fine with DMD 0.160 now fails on DMD 0.161 with the following compiler error: Assertion failure: 'next' on line 2226 in file 'mtype.c' Looking at mtype.c I notice the assert makes sure 'next' is not null, but on the next line it checks 'next' for null and acts appropriately; also, in the same function of DMD 0.160 this null check is not there, only the assert, so it leads me to believe that perhaps the new compiler now allows a null 'next' but the assert was left accidentally. I tried simplifying my code to make a small reproducable example, but this project is huge and the changes were causing template mixin forward reference errors. Compiling with -v shows it fails on the first semantic pass.There's no way to track this down without a reproducible test case.
Jun 23 2006
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bruno Medeiros schrieb am 2006-06-23:[snip]template tpl() { typeof( {} ) foo; } int main(char[][] args) { tpl!(); return 0; } » Assertion failure: 'next' on line 2226 in file 'mtype.c' Not sure if this is the same as bug 220, since that one asserts on a different line (altough on the same file), and the test case seems different.Added to DStress as http://dstress.kuehne.cn/run/b/bug_mtype_2226_A.d http://dstress.kuehne.cn/run/b/bug_mtype_2226_B.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFEo7ja3w+/yD4P9tIRApoZAKCkzviTOmEau6ZnPqYwlHVKtnwqfACfbqbh apH8t/ytCqHn2K2//Ens2JU= =oPTq -----END PGP SIGNATURE-----
Jun 29 2006
Thomas Kuehne wrote:-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bruno Medeiros schrieb am 2006-06-23: [snip]Seems this was fixed in DMD 162. -- Bruno Medeiros - CS/E student http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#Dtemplate tpl() { typeof( {} ) foo; } int main(char[][] args) { tpl!(); return 0; } � Assertion failure: 'next' on line 2226 in file 'mtype.c' Not sure if this is the same as bug 220, since that one asserts on a different line (altough on the same file), and the test case seems different.Added to DStress as http://dstress.kuehne.cn/run/b/bug_mtype_2226_A.d http://dstress.kuehne.cn/run/b/bug_mtype_2226_B.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFEo7ja3w+/yD4P9tIRApoZAKCkzviTOmEau6ZnPqYwlHVKtnwqfACfbqbh apH8t/ytCqHn2K2//Ens2JU= =oPTq -----END PGP SIGNATURE-----
Jul 01 2006