This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]