This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[patch][sh] Avoid reading uninitialized data in tc-sh.c
- From: Andrew Stubbs <ams at codesourcery dot com>
- To: binutils at sourceware dot org
- Date: Fri, 19 Feb 2010 14:05:01 +0000
- Subject: [patch][sh] Avoid reading uninitialized data in tc-sh.c
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
Attachment:
binutils-valgrind.patch
Description: Text document