From 7000880e78fd68f00accb80e11437b824884aea4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 29 Dec 2006 20:44:16 +0000 Subject: [PATCH] remove extra log entry --- libdwfl/ChangeLog | 7 +++---- libdwfl/dwfl_module.c | 4 +++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index 50e9e1bb9..0ee9633e1 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,8 +1,7 @@ -2006-12-29 Ulrich Drepper +2006-12-27 Roland McGrath - * dwfl_module.c (compare_modules): Do not try to be smart and use - subtraction which can lead to wrong results. - Patch by Frank Eigler . + * dwfl_module.c (compare_modules): Fix address comparison to avoid + signed overflow. Patch by Frank Ch. Eigler . 2006-10-30 Roland McGrath diff --git a/libdwfl/dwfl_module.c b/libdwfl/dwfl_module.c index 0cccb5c09..16c616d26 100644 --- a/libdwfl/dwfl_module.c +++ b/libdwfl/dwfl_module.c @@ -172,7 +172,9 @@ compare_modules (const void *a, const void *b) if (m2 == NULL) return 1; - if (m1->low_addr < m2->low_addr + /* No signed difference calculation is correct here, since the + terms are unsigned and could be more than INT64_MAX apart. */ + if (m1->low_addr < m2->low_addr) return -1; if (m1->low_addr > m2->low_addr) return 1; -- 2.47.2