-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #51465, caused by libunwind/libunwind#203. Ref JuliaPackaging/Yggdrasil#7466
- Loading branch information
Showing
4 changed files
with
217 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
LibUnwind.v1.7.2+1.aarch64-linux-gnu.tar.gz/md5/5c73031895f590a08b52200259b7bdf3 | ||
LibUnwind.v1.7.2+1.aarch64-linux-gnu.tar.gz/sha512/f0b4cb946bab283c3a2dbd1278c556e7c41226ee3672a83dfd66a75f38ca6487a17a43d7e2a90720abd5468c4fb7fdee5f5ffa6d18fc15c85fa76a61a9e7135a | ||
LibUnwind.v1.7.2+1.aarch64-linux-musl.tar.gz/md5/beadb9e35c0713759482952273444135 | ||
LibUnwind.v1.7.2+1.aarch64-linux-musl.tar.gz/sha512/cd37803ea219eddfc0b792bb54b2d5002479485efc30052cd1e5397dbbc2a3d666d57daab983dd2bb236db6eecfc3ccb2fe9726dfa464dcc2b5c0549c9a3b520 | ||
LibUnwind.v1.7.2+1.armv6l-linux-gnueabihf.tar.gz/md5/615030f6c33a37308f72c2c9a976eda8 | ||
LibUnwind.v1.7.2+1.armv6l-linux-gnueabihf.tar.gz/sha512/8d417fef3dfbac4c380ed6585e408c6c2958a1dff211812754c5198f82c699b0b40672b0acb1cff3e8bdbb7d2ff4a51ebac209b4d6d5922359e0d3221daf4521 | ||
LibUnwind.v1.7.2+1.armv6l-linux-musleabihf.tar.gz/md5/20889d57eb365a7a318710d424a57163 | ||
LibUnwind.v1.7.2+1.armv6l-linux-musleabihf.tar.gz/sha512/9e335a6eaeac08a7476dc1ee87952b7202c0bee073cbe96e71690b7e179c3d739c628bb8b511747330a519b3e99b7590e5b235106e8d788be93e156a6040e845 | ||
LibUnwind.v1.7.2+1.armv7l-linux-gnueabihf.tar.gz/md5/3383684c3d47f3707786df48b7ac9668 | ||
LibUnwind.v1.7.2+1.armv7l-linux-gnueabihf.tar.gz/sha512/be4828b347a7324c06bef3c3f457e9a1f28c1f37ed9a2de9c2888d73ee55f207b56be485131cc26b393311697c22dae66084d0496dc77ce61ad2bf24e2a0b9cb | ||
LibUnwind.v1.7.2+1.armv7l-linux-musleabihf.tar.gz/md5/be6fe35176f002c636f3b009fc8e3e53 | ||
LibUnwind.v1.7.2+1.armv7l-linux-musleabihf.tar.gz/sha512/13746270bf6a4c34a6e15964c5035b2f2b4d361a40f75294c5be2c37b5f39a94375ac832e4ebacd33a1d52d0ef4220e76c4e666420bd2ebef238e950e0a00258 | ||
LibUnwind.v1.7.2+1.i686-linux-gnu.tar.gz/md5/33f3514cdb3d039137f543599a98f3ca | ||
LibUnwind.v1.7.2+1.i686-linux-gnu.tar.gz/sha512/2aea691a1d0dfabefbe12b15ee1203ca037284c18733fb56a8feb0e79e352fd4f8ce55fb585748d936b513226cd21b9545cf1092f0b4e87e67397acf544c8926 | ||
LibUnwind.v1.7.2+1.i686-linux-musl.tar.gz/md5/4aed5e07fbf7e4860ff184e106cf27c4 | ||
LibUnwind.v1.7.2+1.i686-linux-musl.tar.gz/sha512/cf0ecace4b888e77153bc9697bf1cbd7834fe592d7012f7b5d9d700a0f39cb95fd0870437e3ba3c3fe0816d29f119bf3282c230dfaa2af10fcb9006d69141dac | ||
LibUnwind.v1.7.2+1.powerpc64le-linux-gnu.tar.gz/md5/60f8567a63b5e9562a18591be16dcf8a | ||
LibUnwind.v1.7.2+1.powerpc64le-linux-gnu.tar.gz/sha512/82cf61e3775f575f19a607618d345a0bb393b48099f835227c000f632bfb9bd851fc00b9fa80b79898d1309d7dcc4e4c2c3cd3239d66381693bda95db9673907 | ||
LibUnwind.v1.7.2+1.x86_64-linux-gnu.tar.gz/md5/5b0cdaab2a0dc470d3926227f2cc67f9 | ||
LibUnwind.v1.7.2+1.x86_64-linux-gnu.tar.gz/sha512/ae8f9b85a83208601c067b2c8d6c69b87d78b940dd7d8bce08da61df0d440191cc0490c0958a1c1cf027b333965659bccfd122fed91ef5f04163f4c0abf6ab35 | ||
LibUnwind.v1.7.2+1.x86_64-linux-musl.tar.gz/md5/606580e0a666939a5cd6e5454f5f0062 | ||
LibUnwind.v1.7.2+1.x86_64-linux-musl.tar.gz/sha512/95ecae2208ea957f79d21f2e3229c7b4e14f012c961502dc67892629555fb867ccbe0e1169bbfd6cd2c8386e2dd939e76a4c0853dc602441332f2d7bcd98f637 | ||
LibUnwind.v1.7.2+1.x86_64-unknown-freebsd.tar.gz/md5/d043be8787b39d5e9a467bd8ff90be1d | ||
LibUnwind.v1.7.2+1.x86_64-unknown-freebsd.tar.gz/sha512/44fda1ffe4a3f4d442dcccb414efe6c0d6ab895f619d74f4aa8cdcef26d9388d7b6975cb43fc18b207df1f2e61faf3555d65db8597f85e3ab4b053be5ce72e66 | ||
LibUnwind.v1.7.2+2.aarch64-linux-gnu.tar.gz/md5/2c8bdfc891b817cdcebad5cec3fe03ba | ||
LibUnwind.v1.7.2+2.aarch64-linux-gnu.tar.gz/sha512/c06eb08411c9759b7d0043258e239620eebac36b573c58d91f5cd3c6b801a33fb42833c21e0badcd958085adb1eddcf3d37386143b7584fd2c0631efa225acce | ||
LibUnwind.v1.7.2+2.aarch64-linux-musl.tar.gz/md5/3233eec783f73a9723f5c9c06a4085e9 | ||
LibUnwind.v1.7.2+2.aarch64-linux-musl.tar.gz/sha512/91b5f6eba193b6c2abaac30ad805003142dd48b8bbda36c9d50e7802a17abf04f95b5d21c3d842697653834ee2c21c222f0b96d8f142a99f3819a58493817474 | ||
LibUnwind.v1.7.2+2.armv6l-linux-gnueabihf.tar.gz/md5/75dc5ea25f5055959d348523ed6f1bdb | ||
LibUnwind.v1.7.2+2.armv6l-linux-gnueabihf.tar.gz/sha512/315e3e05caec95a81fef570aee3328f4f8b617a9567249b7e535a3b4246f9a39c6bc45dc0f3c061e6a796b94d839c308f0bba083a06093df4a9932328e1c6dee | ||
LibUnwind.v1.7.2+2.armv6l-linux-musleabihf.tar.gz/md5/99b02885777f3954cb9569849304f6fc | ||
LibUnwind.v1.7.2+2.armv6l-linux-musleabihf.tar.gz/sha512/b73ab8472cf60fb9e88d391543e5349246d05b90fa6b0ea793fca0e1a67ce91cc8f12a09c9e4594add5264c0363b157b879b89ce881ae33f0f7e3315b56aec5e | ||
LibUnwind.v1.7.2+2.armv7l-linux-gnueabihf.tar.gz/md5/ce447b3e3a9e8f990f914faa6cb37db0 | ||
LibUnwind.v1.7.2+2.armv7l-linux-gnueabihf.tar.gz/sha512/efb8aff3a23dbbc8b65414f7f39af4a664311120f2da61b7b70dd8c7da30230582d8256c2b5421e00b2d70062e767694e358dafbbae83a69f550a5d0ac6a62b9 | ||
LibUnwind.v1.7.2+2.armv7l-linux-musleabihf.tar.gz/md5/535b71f32d85b18208b911a13a9a0672 | ||
LibUnwind.v1.7.2+2.armv7l-linux-musleabihf.tar.gz/sha512/267b72cdb3fe1fc63031fe76fd3ffc3afc97775a541dc2357df4f849d585064c0492b82ef3c16efce0f0573778ee56ed7886e97c6591f7a8cda27f705b0b65e4 | ||
LibUnwind.v1.7.2+2.i686-linux-gnu.tar.gz/md5/97b6867d8d20abef8b96f5fc17e932b9 | ||
LibUnwind.v1.7.2+2.i686-linux-gnu.tar.gz/sha512/ff48995503447288945dab6f32f85801b81be98ec9f5bcc933305230befb51a9c0aeb588e722ebde3694cc9e73ee6b443ae5eedec352c5c166603dca8c23c559 | ||
LibUnwind.v1.7.2+2.i686-linux-musl.tar.gz/md5/3864ac880d38adb276e353904bf2b18d | ||
LibUnwind.v1.7.2+2.i686-linux-musl.tar.gz/sha512/36198cf175d6db1dfbb43ed498ad25eab2392958f21fc8a83aafdb4f54aacf8c3a473d313b117a835c81e56b7a20ff2bf152dee8f4280cdf7ef0e751d736a362 | ||
LibUnwind.v1.7.2+2.powerpc64le-linux-gnu.tar.gz/md5/b4e6b56f160be18abbaac5f36d161753 | ||
LibUnwind.v1.7.2+2.powerpc64le-linux-gnu.tar.gz/sha512/354f92c8658b465545b2ae77826f0ae4580084ec3e7723900e064245bdb0c38bc8dc9dc04bc505e83879d8bb3d2291493c091e83929aba23d42c99dc622a2bf0 | ||
LibUnwind.v1.7.2+2.x86_64-linux-gnu.tar.gz/md5/1d82791f522deadb3bc3232997d094be | ||
LibUnwind.v1.7.2+2.x86_64-linux-gnu.tar.gz/sha512/9603731e4f40c89b6a157c754c1e89ca7c38349e2099e072957123967e6d9c8bd7df1725afc9ffe1c9137ada6e364deb19b4b91fc19d099d7acf1bced3caf2e0 | ||
LibUnwind.v1.7.2+2.x86_64-linux-musl.tar.gz/md5/278dd4a9d36169b3c7719ac83f3d3fed | ||
LibUnwind.v1.7.2+2.x86_64-linux-musl.tar.gz/sha512/68952cbc9ac3e379412bc8482379621809bdd1d77095a44f18b96ff5f58bc338e502305941db0cfae0b68d4ee3719d7db898b64ccd815f1b71110cbc49a4b11f | ||
LibUnwind.v1.7.2+2.x86_64-unknown-freebsd.tar.gz/md5/d043be8787b39d5e9a467bd8ff90be1d | ||
LibUnwind.v1.7.2+2.x86_64-unknown-freebsd.tar.gz/sha512/44fda1ffe4a3f4d442dcccb414efe6c0d6ab895f619d74f4aa8cdcef26d9388d7b6975cb43fc18b207df1f2e61faf3555d65db8597f85e3ab4b053be5ce72e66 | ||
libunwind-1.7.2.tar.gz/md5/35799cd8e475d3e157230ad2590c10f1 | ||
libunwind-1.7.2.tar.gz/sha512/903f7e26c7d4c22e6ef4fe8954ca0f153fdf346cec40e1e8f7ab966d251110f4deb0a84d1fd150aee194ed966b5c1e01ee27c821cd043859852da33a94faae1f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,187 @@ | ||
From 7ae19a08467254f0b3d7a513ef82651b283f38a9 Mon Sep 17 00:00:00 2001 | ||
From: Tim Besard <tim.besard@gmail.com> | ||
Date: Wed, 27 Sep 2023 12:51:59 +0000 | ||
Subject: [PATCH] Revert "Fix unwinding of pre-linked libraries" | ||
|
||
This reverts commit a4014f33775321b4106a1134b89020a7774902dd, | ||
which regresses unwinding on FreeBSD (JuliaLang/julia#51467). | ||
--- | ||
include/dwarf.h | 2 -- | ||
include/libunwind-dynamic.h | 1 - | ||
src/dwarf/Gfind_proc_info-lsb.c | 42 +++++++-------------------------- | ||
src/dwarf/Gfind_unwind_table.c | 1 - | ||
4 files changed, 8 insertions(+), 38 deletions(-) | ||
|
||
diff --git a/include/dwarf.h b/include/dwarf.h | ||
index dd9014b7..312166cd 100644 | ||
--- a/include/dwarf.h | ||
+++ b/include/dwarf.h | ||
@@ -371,8 +371,6 @@ struct unw_debug_frame_list | ||
/* The start (inclusive) and end (exclusive) of the described region. */ | ||
unw_word_t start; | ||
unw_word_t end; | ||
- /* ELF load offset */ | ||
- unw_word_t load_offset; | ||
/* The debug frame itself. */ | ||
char *debug_frame; | ||
size_t debug_frame_size; | ||
diff --git a/include/libunwind-dynamic.h b/include/libunwind-dynamic.h | ||
index a26f2c99..c902ccd9 100644 | ||
--- a/include/libunwind-dynamic.h | ||
+++ b/include/libunwind-dynamic.h | ||
@@ -141,7 +141,6 @@ typedef struct unw_dyn_info | ||
unw_word_t gp; /* global-pointer in effect for this entry */ | ||
int32_t format; /* real type: unw_dyn_info_format_t */ | ||
int32_t pad; | ||
- unw_word_t load_offset; /* ELF load offset */ | ||
union | ||
{ | ||
unw_dyn_proc_info_t pi; | ||
diff --git a/src/dwarf/Gfind_proc_info-lsb.c b/src/dwarf/Gfind_proc_info-lsb.c | ||
index 8ead48f0..154e9b5a 100644 | ||
--- a/src/dwarf/Gfind_proc_info-lsb.c | ||
+++ b/src/dwarf/Gfind_proc_info-lsb.c | ||
@@ -108,17 +108,13 @@ linear_search (unw_addr_space_t as, unw_word_t ip, | ||
|
||
static int | ||
load_debug_frame (const char *file, char **buf, size_t *bufsize, int is_local, | ||
- unw_word_t segbase, unw_word_t *load_offset) | ||
+ unw_word_t segbase) | ||
{ | ||
struct elf_image ei; | ||
- Elf_W (Ehdr) *ehdr; | ||
- Elf_W (Phdr) *phdr; | ||
Elf_W (Shdr) *shdr; | ||
- int i; | ||
int ret; | ||
|
||
ei.image = NULL; | ||
- *load_offset = 0; | ||
|
||
ret = elf_w (load_debuglink) (file, &ei, is_local); | ||
if (ret != 0) | ||
@@ -193,20 +189,6 @@ load_debug_frame (const char *file, char **buf, size_t *bufsize, int is_local, | ||
#if defined(SHF_COMPRESSED) | ||
} | ||
#endif | ||
- | ||
- ehdr = ei.image; | ||
- phdr = (Elf_W (Phdr) *) ((char *) ei.image + ehdr->e_phoff); | ||
- | ||
- for (i = 0; i < ehdr->e_phnum; ++i) | ||
- if (phdr[i].p_type == PT_LOAD) | ||
- { | ||
- *load_offset = segbase - phdr[i].p_vaddr; | ||
- | ||
- Debug (4, "%s load offset is 0x%zx\n", file, *load_offset); | ||
- | ||
- break; | ||
- } | ||
- | ||
munmap(ei.image, ei.size); | ||
return 0; | ||
} | ||
@@ -259,7 +241,6 @@ locate_debug_info (unw_addr_space_t as, unw_word_t addr, unw_word_t segbase, | ||
int err; | ||
char *buf; | ||
size_t bufsize; | ||
- unw_word_t load_offset; | ||
|
||
/* First, see if we loaded this frame already. */ | ||
|
||
@@ -287,7 +268,7 @@ locate_debug_info (unw_addr_space_t as, unw_word_t addr, unw_word_t segbase, | ||
name = (char*) dlname; | ||
|
||
err = load_debug_frame (name, &buf, &bufsize, as == unw_local_addr_space, | ||
- segbase, &load_offset); | ||
+ segbase); | ||
|
||
if (!err) | ||
{ | ||
@@ -300,7 +281,6 @@ locate_debug_info (unw_addr_space_t as, unw_word_t addr, unw_word_t segbase, | ||
|
||
fdesc->start = start; | ||
fdesc->end = end; | ||
- fdesc->load_offset = load_offset; | ||
fdesc->debug_frame = buf; | ||
fdesc->debug_frame_size = bufsize; | ||
fdesc->index = NULL; | ||
@@ -497,7 +477,6 @@ dwarf_find_debug_frame (int found, unw_dyn_info_t *di_debug, unw_word_t ip, | ||
di->format = UNW_INFO_FORMAT_TABLE; | ||
di->start_ip = fdesc->start; | ||
di->end_ip = fdesc->end; | ||
- di->load_offset = fdesc->load_offset; | ||
di->u.ti.name_ptr = (unw_word_t) (uintptr_t) obj_name; | ||
di->u.ti.table_data = (unw_word_t *) fdesc; | ||
di->u.ti.table_len = sizeof (*fdesc) / sizeof (unw_word_t); | ||
@@ -960,14 +939,12 @@ dwarf_search_unwind_table (unw_addr_space_t as, unw_word_t ip, | ||
ip_base = segbase; | ||
} | ||
|
||
- Debug (6, "lookup IP 0x%lx\n", (long) (ip - ip_base - di->load_offset)); | ||
- | ||
#ifndef UNW_REMOTE_ONLY | ||
if (as == unw_local_addr_space) | ||
{ | ||
- e = lookup (table, table_len, ip - ip_base - di->load_offset); | ||
+ e = lookup (table, table_len, ip - ip_base); | ||
if (e && &e[1] < &table[table_len / sizeof (unw_word_t)]) | ||
- last_ip = e[1].start_ip_offset + ip_base + di->load_offset; | ||
+ last_ip = e[1].start_ip_offset + ip_base; | ||
else | ||
last_ip = di->end_ip; | ||
} | ||
@@ -975,7 +952,7 @@ dwarf_search_unwind_table (unw_addr_space_t as, unw_word_t ip, | ||
#endif | ||
{ | ||
#ifndef UNW_LOCAL_ONLY | ||
- int32_t last_ip_offset = di->end_ip - ip_base - di->load_offset; | ||
+ int32_t last_ip_offset = di->end_ip - ip_base; | ||
segbase = di->u.rti.segbase; | ||
if ((ret = remote_lookup (as, (uintptr_t) table, table_len, | ||
ip - ip_base, &ent, &last_ip_offset, arg)) < 0) | ||
@@ -983,7 +960,7 @@ dwarf_search_unwind_table (unw_addr_space_t as, unw_word_t ip, | ||
if (ret) | ||
{ | ||
e = &ent; | ||
- last_ip = last_ip_offset + ip_base + di->load_offset; | ||
+ last_ip = last_ip_offset + ip_base; | ||
} | ||
else | ||
e = NULL; /* no info found */ | ||
@@ -997,8 +974,8 @@ dwarf_search_unwind_table (unw_addr_space_t as, unw_word_t ip, | ||
unwind info. */ | ||
return -UNW_ENOINFO; | ||
} | ||
- Debug (15, "ip=0x%lx, load_offset=0x%lx, start_ip=0x%lx\n", | ||
- (long) ip, (long) di->load_offset, (long) (e->start_ip_offset)); | ||
+ Debug (15, "ip=0x%lx, start_ip=0x%lx\n", | ||
+ (long) ip, (long) (e->start_ip_offset)); | ||
if (debug_frame_base) | ||
fde_addr = e->fde_offset + debug_frame_base; | ||
else | ||
@@ -1022,9 +999,6 @@ dwarf_search_unwind_table (unw_addr_space_t as, unw_word_t ip, | ||
pi->flags = UNW_PI_FLAG_DEBUG_FRAME; | ||
} | ||
|
||
- pi->start_ip += di->load_offset; | ||
- pi->end_ip += di->load_offset; | ||
- | ||
#if defined(NEED_LAST_IP) | ||
pi->last_ip = last_ip; | ||
#else | ||
diff --git a/src/dwarf/Gfind_unwind_table.c b/src/dwarf/Gfind_unwind_table.c | ||
index fb20fea0..62feb26c 100644 | ||
--- a/src/dwarf/Gfind_unwind_table.c | ||
+++ b/src/dwarf/Gfind_unwind_table.c | ||
@@ -193,7 +193,6 @@ dwarf_find_unwind_table (struct elf_dyn_info *edi, unw_addr_space_t as, | ||
|
||
edi->di_cache.start_ip = start_ip; | ||
edi->di_cache.end_ip = end_ip; | ||
- edi->di_cache.load_offset = 0; | ||
edi->di_cache.format = UNW_INFO_FORMAT_REMOTE_TABLE; | ||
edi->di_cache.u.rti.name_ptr = 0; | ||
/* two 32-bit values (ip_offset/fde_offset) per table-entry: */ | ||
-- | ||
2.41.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters