diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc b/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc index b53cb5912a6d3..30a1b9865f8f7 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc @@ -629,6 +629,10 @@ class DynamicSegment { last_symbol = Max(buckets[i], last_symbol); } + if (last_symbol < header->symoffset) { + return header->symoffset; + } + // Walk the bucket's chain to add the chain length to the total. uint32_t chain_entry; do {