Bug 4426 – assert(condition, string) fails in std.array.back

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Linux
Creation time
2010-07-04T13:57:00Z
Last change time
2012-02-01T19:35:08Z
Assigned to
nobody
Creator
andrei

Comments

Comment #0 by andrei — 2010-07-04T13:57:23Z
This test inside std.array.back causes a segfault: assert(a.length, "Attempting to fetch the back of an empty array"); This doesn't: assert(a.length); The bug seems to manifest itself only on Linux and only in release mode. To reproduce, build Phobos on Linux like this: make -f linux.mak unittest BUILD=release DMDEXTRAFLAGS="-version=bugXXXX" where XXXX is the number of this bug report.
Comment #1 by yebblies — 2012-02-01T19:35:08Z
The workaround is gone from std.array.back.