[binutils-gdb] gas pending_bundle_size assert
Alan Modra
amodra@sourceware.org
Sun Jul 6 11:06:46 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=87c1293c7d46b0ff84a55f337fc2ba8b8eb58864
commit 87c1293c7d46b0ff84a55f337fc2ba8b8eb58864
Author: Alan Modra <amodra@gmail.com>
Date: Sat Jul 5 18:27:36 2025 +0930
gas pending_bundle_size assert
oss-fuzz managed to trigger this assert, by assembling directives in
the absolute section. Avoid this using similar code to that in
frags.c:frag_new (commit 2dc2dfa7d7a5).
Diff:
---
gas/read.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gas/read.c b/gas/read.c
index d17e171c4c1..0e04fcbdeea 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -712,7 +712,7 @@ pending_bundle_size (fragS *frag)
if (frag->fr_type == rs_machine_dependent)
size += md_frag_max_var (frag);
- gas_assert (size >= offset);
+ gas_assert (size >= offset || now_seg == absolute_section);
return size - offset;
}
More information about the Binutils-cvs
mailing list