This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Commit: RL78 gas: Fix use of uninitialised memory
- From: Nick Clifton <nickc at redhat dot com>
- To: binutils at sourceware dot org
- Date: Tue, 03 Feb 2015 10:10:15 +0000
- Subject: Commit: RL78 gas: Fix use of uninitialised memory
- Authentication-results: sourceware.org; auth=none
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)