aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndrew Haley <aph@redhat.com>2005-12-15 16:17:50 +0000
committerAndrew Haley <aph@gcc.gnu.org>2005-12-15 16:17:50 +0000
commita8acd1c48099154ef824961457aa1aecfc10bbee (patch)
tree62476ed7ef0802aac9d0408455a2b653a246a9f7 /gcc
parent6c9ac67a41fd7b4c4df8ac3ee28acd490a6cae37 (diff)
downloadgcc-a8acd1c48099154ef824961457aa1aecfc10bbee.zip
gcc-a8acd1c48099154ef824961457aa1aecfc10bbee.tar.gz
gcc-a8acd1c48099154ef824961457aa1aecfc10bbee.tar.bz2
unwind-dw2-fde-glibc.c (_Unwind_IteratePhdrCallback): Guard against prev_cache_entry == NULL when moving a cache entry to the head of...
2005-12-15 Andrew Haley <aph@redhat.com> * unwind-dw2-fde-glibc.c (_Unwind_IteratePhdrCallback): Guard against prev_cache_entry == NULL when moving a cache entry to the head of the list. From-SVN: r108582
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/unwind-dw2-fde-glibc.c5
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3a79601..7c5d580 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2005-12-15 Andrew Haley <aph@redhat.com>
+
+ * unwind-dw2-fde-glibc.c (_Unwind_IteratePhdrCallback): Guard
+ against prev_cache_entry == NULL when moving a cache entry to the
+ head of the list.
+
2005-12-15 Nathan Sidwell <nathan@codesourcery.com>
* config/mt/mt.c (mt_override_options): Require lower case
diff --git a/gcc/unwind-dw2-fde-glibc.c b/gcc/unwind-dw2-fde-glibc.c
index e7bd31b..25bf2bb 100644
--- a/gcc/unwind-dw2-fde-glibc.c
+++ b/gcc/unwind-dw2-fde-glibc.c
@@ -257,7 +257,10 @@ _Unwind_IteratePhdrCallback (struct dl_phdr_info *info, size_t size, void *ptr)
if (size >= sizeof (struct ext_dl_phdr_info))
{
- if (last_cache_entry != NULL)
+ /* Move the cache entry we're about to overwrite to the head of
+ the list. If either last_cache_entry or prev_cache_entry are
+ NULL, that cache entry is already at the head. */
+ if (last_cache_entry != NULL && prev_cache_entry != NULL)
{
prev_cache_entry->link = last_cache_entry->link;
last_cache_entry->link = frame_hdr_cache_head;