* [binutils-gdb] Fix read_ranges for 32-bit long
@ 2023-11-17 17:05 Joseph Myers
0 siblings, 0 replies; only message in thread
From: Joseph Myers @ 2023-11-17 17:05 UTC (permalink / raw)
To: bfd-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5070b0e66c56eff4e197721c884760030df76822
commit 5070b0e66c56eff4e197721c884760030df76822
Author: Joseph Myers <joseph@codesourcery.com>
Date: Fri Nov 17 17:04:14 2023 +0000
Fix read_ranges for 32-bit long
bfd/dwarf2.c:read_ranges compares bfd_vma values against -1UL, which
doesn't work correctly when long is 32-bit and bfd_vma is 64-bit
(observed as "nm -l" being very slow for mingw64 host; probably causes
issues on 32-bit hosts as well as IL32LLP64 cases such as mingw64).
Fix by using (bfd_vma) -1 in place of -1UL, as done elsewhere.
Diff:
---
bfd/dwarf2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index b135ef09120..22e6b467598 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -3688,7 +3688,7 @@ read_ranges (struct comp_unit *unit, struct arange *arange,
if (low_pc == 0 && high_pc == 0)
break;
- if (low_pc == -1UL && high_pc != -1UL)
+ if (low_pc == (bfd_vma) -1 && high_pc != (bfd_vma) -1)
base_address = high_pc;
else
{
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-11-17 17:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-17 17:05 [binutils-gdb] Fix read_ranges for 32-bit long Joseph Myers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).