ubsan: integer overflow in tc-i386.c:offset_in_range
Alan Modra
amodra@gmail.com
Wed May 21 21:54:17 GMT 2025
More information about the Binutils mailing list
Wed May 21 21:54:17 GMT 2025
- Previous message (by thread): [PATCH v2][binutils][2_42 2/2] Backport x86: Check invalid TLS descriptor call (CVE-2025-1179)
- Next message (by thread): ubsan: integer overflow in tc-i386.c:offset_in_range
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
or $9223372036854775808,%eax
runtime error: negation of -9223372036854775808 cannot be represented
in type 'offsetT' (aka 'long'); cast to an unsigned type to negate
this value to itself
Nothing in this function needs a signed type, despite the value under
test being signed.
* config/tc-i386.c (offset_in_range): Make "val" unsigned.
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 162e28e0325..e1f30d4b133 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -2975,7 +2975,7 @@ smallest_imm_type (offsetT num)
}
static offsetT
-offset_in_range (offsetT val, int size)
+offset_in_range (addressT val, int size)
{
addressT mask;
--
Alan Modra
- Previous message (by thread): [PATCH v2][binutils][2_42 2/2] Backport x86: Check invalid TLS descriptor call (CVE-2025-1179)
- Next message (by thread): ubsan: integer overflow in tc-i386.c:offset_in_range
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list