[Issue 23102] pinholeopt, "Conditional jump or move depends on uninitialised value(s)"
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed May 18 04:01:49 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=23102
duser at neet.fi changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |duser at neet.fi
--- Comment #6 from duser at neet.fi ---
Created attachment 1852
--> https://issues.dlang.org/attachment.cgi?id=1852&action=edit
fix
minimal reproducer
uint fn(uint a)
{
return 1 / a;
}
compile: valgrind dmd -O -c test.d
with "--track-origins=yes", valgrind also prints what function the
uninitialized data comes from
==17569== Uninitialised value was created by a stack allocation
==17569== at 0x70AADF: cddiv(CodeBuilder&, elem*, unsigned int*)
(cod2.d:1298)
there was a void-initialized struct there, the patch fixes this by initializing
the field that was checked at "cod3.d:5761" in the backtrace
--
More information about the Digitalmars-d-bugs
mailing list