From 598d4ec8e656f71cf74ec30995d8410b9e15bb2b Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 11 Aug 2025 10:49:51 +0200 Subject: [PATCH] Disable failing subtest of elf/tst-dl_find_object-static (RHEL-108221) Resolves: RHEL-108221 --- glibc-RHEL-108221.patch | 36 ++++++++++++++++++++++++++++++++++++ glibc.spec | 6 +++++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 glibc-RHEL-108221.patch diff --git a/glibc-RHEL-108221.patch b/glibc-RHEL-108221.patch new file mode 100644 index 0000000..5702bd9 --- /dev/null +++ b/glibc-RHEL-108221.patch @@ -0,0 +1,36 @@ +In glibc-RHEL-93320-9.patch, the elf/tst-dl_find_object test was +added. It was later disabled in glibc-RHEL-93320-19.patch, +as noted in the patch description. This was missed when the +patch was re-added in glibc-RHEL-107564.patch. The test remains +valuable because we do not test _dl_find_object in libc.a elsewhere +in the glibc build, so this patch disables just the failing subtest, +and puts an explanation directly into the test. + +diff --git a/elf/tst-dl_find_object.c b/elf/tst-dl_find_object.c +index d8c217545d116453..6bfda7bd23a34c0d 100644 +--- a/elf/tst-dl_find_object.c ++++ b/elf/tst-dl_find_object.c +@@ -231,6 +231,7 @@ do_test (void) + check (map_start, &expected, __LINE__); + check (map_end, &expected, __LINE__); + ++#ifndef FOR_STATIC + /* Check that _dl_find_object works from a shared object (mostly for + static dlopen). */ + __typeof (_dl_find_object) *find_object +@@ -238,6 +239,15 @@ do_test (void) + struct dl_find_object actual; + TEST_COMPARE (find_object (&main_program_data, &actual), 0); + check (&main_program_data, &actual, __LINE__); /* Reversed check. */ ++#else ++ /* Downstream, _dl_find_object does not work after static dlopen ++ because the ld.so copy loaded as part of static dlopen is not ++ initialized. Upstream, we redirect _dl_find_object to the ++ statically version from the main program by patching a function ++ pointer in _rtld_global_ro. Downstream, we have not changed the ++ layout of _rtld_global_ro, so this patching is missing. */ ++ printf ("info: skipping dlopen-based test for static build\n"); ++#endif + + return 0; + } diff --git a/glibc.spec b/glibc.spec index abf9a13..92bf2f2 100644 --- a/glibc.spec +++ b/glibc.spec @@ -157,7 +157,7 @@ end \ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 226%{?dist} +Release: 227%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -1335,6 +1335,7 @@ Patch1019: glibc-RHEL-50086-1.patch Patch1020: glibc-RHEL-50086-2.patch Patch1021: glibc-RHEL-107564.patch Patch1022: glibc-RHEL-105965.patch +Patch1023: glibc-RHEL-108221.patch ############################################################################## # Continued list of core "glibc" package information: @@ -3422,6 +3423,9 @@ update_gconv_modules_cache () %endif %changelog +* Mon Aug 11 2025 Florian Weimer - 2.34-227 +- Disable failing subtest of elf/tst-dl_find_object-static (RHEL-108221) + * Thu Aug 07 2025 Florian Weimer - 2.34-226 - Prevent inlining of _dl_debug_state (RHEL-105965)