[patch][sh] Avoid reading uninitialized data in tc-sh.c
Andrew Stubbs
ams@codesourcery.com
Fri Feb 19 14:05:00 GMT 2010
Hi all,
The attached patch corrects a defect in the the SH assembler, found
using valgrind.
I believe the problem was benign - it was simply checking displacements
for instructions that needed them, but before it had identified whether
that instruction was relevant or not. If the random data was out of
range for the displacement then the instruction was rejected, just as it
would have been when it was found to be the wrong sort. Real problem or
not, it's better to silence the warning so as not to hide other real
problems.
The patch merely moves the displacement checking code until after the
opcode matching code.
OK?
Andrew
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: binutils-valgrind.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20100219/f944ee32/attachment.ksh>
More information about the Binutils
mailing list