aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2025-07-05 18:27:36 +0930
committerAlan Modra <amodra@gmail.com>2025-07-06 20:35:50 +0930
commit87c1293c7d46b0ff84a55f337fc2ba8b8eb58864 (patch)
tree62fa464c6787b8501b4b19be093d5d8081cfaab4
parent4983caae5eec2acaa1b2a9c7a056f10d3fe697b2 (diff)
downloadbinutils-87c1293c7d46b0ff84a55f337fc2ba8b8eb58864.zip
binutils-87c1293c7d46b0ff84a55f337fc2ba8b8eb58864.tar.gz
binutils-87c1293c7d46b0ff84a55f337fc2ba8b8eb58864.tar.bz2
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).
-rw-r--r--gas/read.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gas/read.c b/gas/read.c
index d17e171..0e04fcb 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;
}