Commit: RL78 gas: Fix use of uninitialised memory
Nick Clifton
nickc@redhat.com
Tue Feb 3 10:10:00 GMT 2015
Hi Guys,
I am applying the patch below to fix a bug in the RL78 port of gas,
where uninitialised memory could be used. The problem was that the X_md
field of the expression structure was not being initialised before the
rl78_cons_fix_new function was called, which resulted in
non-deterministic behaviour.
Cheers
Nick
gas/ChangeLog
2015-02-03 Nick Clifton <nickc@redhat.com>
* config/tc-rl78.h (TC_PARSE_CONS_EXPRESSION): Define.
diff --git a/gas/config/tc-rl78.h b/gas/config/tc-rl78.h
index 7962846..e2b9699 100644
--- a/gas/config/tc-rl78.h
+++ b/gas/config/tc-rl78.h
@@ -82,3 +82,6 @@ extern void rl78_handle_align (fragS *);
#define elf_tc_final_processing rl78_elf_final_processing
extern void rl78_elf_final_processing (void);
+
+#define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) \
+ ((EXP)->X_md = 0, expression (EXP), TC_PARSE_CONS_RETURN_NONE)
More information about the Binutils
mailing list