Bug 25 – DMD segfault on foreach in template

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P3
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2006-03-08T05:58:00Z
Last change time
2014-02-15T02:09:17Z
Assigned to
bugzilla
Creator
oskar.linde

Comments

Comment #0 by oskar.linde — 2006-03-08T05:58:02Z
This bug is present in 0.149. It was not available in the version list. template crash(T) { void crash(T t) { foreach(u;t) {} } } void main() { crash(null); } Causes DMD 0.149 linux to segfault. (It segfaults on the non-IFTI version too)
Comment #1 by thomas-dloop — 2006-03-08T09:50:33Z
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > This bug is present in 0.149. It was not available in the version list. > > template crash(T) { > void crash(T t) { > foreach(u;t) {} > } > } > > void main() { > crash(null); > } > > Causes DMD 0.149 linux to segfault. (It segfaults on the non-IFTI version too) Added to DStress as http://dstress.kuehne.cn/run/f/foreach_34_A.d http://dstress.kuehne.cn/run/f/foreach_34_B.d http://dstress.kuehne.cn/run/f/foreach_34_C.d http://dstress.kuehne.cn/run/f/foreach_34_D.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFEDvln3w+/yD4P9tIRAmWuAKCYMuX7J1wtThXLsjjthmBTjU6aMgCgkqzn yBB5OTCmyGQfnwNwSjnvgG0= =VzQM -----END PGP SIGNATURE-----
Comment #2 by bugzilla — 2006-03-20T22:21:19Z
Fixed 0.150