diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2015-02-11 10:23:23 -0500 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2015-02-11 10:23:23 -0500 |
commit | c9b8616c515f7689baf0706a9c17d3f9d625ef04 (patch) | |
tree | c4fff2a4328144c81860d92080c7a5a22f39d136 /src/SConscript | |
parent | 431a6d708b4346ec81bade79033cc34308a5144f (diff) | |
download | gem5-c9b8616c515f7689baf0706a9c17d3f9d625ef04.tar.xz |
base: Do not dereference NULL in CompoundFlag creation
This patch fixes the CompoundFlag constructor, ensuring that it does
not dereference NULL. Doing so has undefined behaviuor, and both clang
and gcc's undefined-behaviour sanitiser was rather unhappy.
Diffstat (limited to 'src/SConscript')
-rwxr-xr-x | src/SConscript | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/SConscript b/src/SConscript index f85ed7a62..cffc4d157 100755 --- a/src/SConscript +++ b/src/SConscript @@ -852,9 +852,9 @@ namespace Debug { last = len(compound) - 1 for i,flag in enumerate(compound): if i != last: - comp_code('$flag,') + comp_code('&$flag,') else: - comp_code('$flag);') + comp_code('&$flag);') comp_code.dedent() code.append(comp_code) |