[Issue 11528] New: appender: crash with -inline -O
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Nov 16 08:29:43 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11528
Summary: appender: crash with -inline -O
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: regression
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: r.sagitario at gmx.de
--- Comment #0 from Rainer Schuetze <r.sagitario at gmx.de> 2013-11-16 08:29:39 PST ---
This program is tweaked to cause a crash when building for Win32:
import std.array;
void main()
{
auto arr = appender!string();
asm { mov EBX,-1; }
arr.put("1");
}
>dmd -inline -O -g test.d
>test
object.Error: Integer Divide by Zero
----------------
0x004222B6 in _ULDIV
0x00404D2A in stdarrayAppender at m:\s\d\rainers\phobos\std\array.d(2453)
0x004234C0 in memset
0x0040F76E in _d_newitemT
0x00405AC0 in stdarrayAppender at m:\s\d\rainers\phobos\std\array.d(2339)
0x0040E5F8 in rtdmain2_d_run_mainrunAll__lambda1
0x0040E5CB in rtdmain2_d_run_mainrunAll
0x0040E4E1 in _d_run_main
0x0040CD90 in main at M:\s\d\rainers\bugs\rs165\test.d(3)
0x75EC850D in BaseThreadInitThunk
0x77DDBF39 in RtlInitializeExceptionChain
0x77DDBF0C in RtlInitializeExceptionChain
This is caused by the bsr intrinsic having undefined behaviour for 0 (i.e. the
previous value of the destination register is preserved).
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list