aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-06-03 22:40:21 +0930
committerAlan Modra <amodra@gmail.com>2022-06-03 23:32:39 +0930
commit7e6ba6a2a56e6195da36329bdeb1654e20aad198 (patch)
tree4dc7b6fe848e7ad676b47d80e258223158d25acf /gas
parent450afa9497ab57588a79f5a3d828b9773643a852 (diff)
downloadgdb-7e6ba6a2a56e6195da36329bdeb1654e20aad198.zip
gdb-7e6ba6a2a56e6195da36329bdeb1654e20aad198.tar.gz
gdb-7e6ba6a2a56e6195da36329bdeb1654e20aad198.tar.bz2
Re: ubsan: undefined shift in frag_align_code
This one needs the same fix too. * config/tc-i386.h (MAX_MEM_FOR_RS_ALIGN_CODE): Avoid signed integer overflow.
Diffstat (limited to 'gas')
-rw-r--r--gas/config/tc-i386.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h
index d7c6b33..817539e 100644
--- a/gas/config/tc-i386.h
+++ b/gas/config/tc-i386.h
@@ -207,7 +207,8 @@ if ((n) \
goto around; \
}
-#define MAX_MEM_FOR_RS_ALIGN_CODE (alignment ? ((1 << alignment) - 1) : 1)
+#define MAX_MEM_FOR_RS_ALIGN_CODE \
+ (alignment ? ((size_t) 1 << alignment) - 1 : (size_t) 1)
extern void i386_cons_align (int);
#define md_cons_align(nbytes) i386_cons_align (nbytes)