[Issue 5534] New: [64-bit] Inexplicable segfault in small code snippet, -O -release -m64 only
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Feb 6 14:26:09 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5534
Summary: [64-bit] Inexplicable segfault in small code snippet,
-O -release -m64 only
Product: D
Version: D2
Platform: Other
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: dsimcha at yahoo.com
--- Comment #0 from David Simcha <dsimcha at yahoo.com> 2011-02-06 14:23:46 PST ---
The following code segfaults, but only when compiled with -O -release -m64. If
any of these three options are omitted, it succeeds. Also, note that it
doesn't throw a RangeError when bounds checking is turned on, so the issue is
not that that the bounds are somehow wrong.
void doStuff(byte start, byte end, uint increment = 1U) {
auto output = new byte[3];
size_t count = 0;
for(byte i = start; i < end; i += increment) {
output[count++] = i;
}
}
void main() {
doStuff(0, 3);
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list