public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/gdb] gdb-17.2-rebase-f44: Remove gdb-rhbz1156192-recursive-dlopen-test.patch
@ 2026-06-28 0:01 Guinevere Larsen
0 siblings, 0 replies; only message in thread
From: Guinevere Larsen @ 2026-06-28 0:01 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/gdb
Branch : gdb-17.2-rebase-f44
Commit : 264209d472072440a0c148014b747b5068320e5f
Author : Guinevere Larsen <guinevere@redhat.com>
Date : 2025-01-06T16:41:33-03:00
Stats : +11/-380 in 5 file(s)
URL : https://src.fedoraproject.org/rpms/gdb/c/264209d472072440a0c148014b747b5068320e5f?branch=gdb-17.2-rebase-f44
Log:
Remove gdb-rhbz1156192-recursive-dlopen-test.patch
the test relies __malloc_hook, which was deprecated as has been
removed from glibc already. Since the test was never about a GDB
bug, but a glibc bug, and there is no portable way to re-do the
code, the test is just removed.
---
diff --git a/_gdb.spec.Patch.include b/_gdb.spec.Patch.include
index af70e12..1d333f4 100644
--- a/_gdb.spec.Patch.include
+++ b/_gdb.spec.Patch.include
@@ -38,24 +38,19 @@ Patch009: gdb-test-bt-cfi-without-die.patch
#=fedoratest
Patch010: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch
-# Testcase for '[SAP] Recursive dlopen causes SAP HANA installer to
-# crash.' (RH BZ 1156192).
-#=fedoratest
-Patch011: gdb-rhbz1156192-recursive-dlopen-test.patch
-
# Fix '`catch syscall' doesn't work for parent after `fork' is called'
# (Philippe Waroquiers, RH BZ 1149205).
#=fedoratest
-Patch012: gdb-rhbz1149205-catch-syscall-after-fork-test.patch
+Patch011: gdb-rhbz1149205-catch-syscall-after-fork-test.patch
# Fix '[ppc64] and [s390x] wrong prologue skip on -O2 -g code' (Jan
# Kratochvil, RH BZ 1084404).
#=fedoratest
-Patch013: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch
+Patch012: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch
# [aarch64] Fix hardware watchpoints (RH BZ 1261564).
#=fedoratest
-Patch014: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
+Patch013: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
# Update gdb-add-index.sh such that, when the GDB environment
# variable is not set, the script is smarter than just looking for
@@ -69,7 +64,7 @@ Patch014: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
# https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot
#
#=fedora
-Patch015: gdb-add-index.patch
+Patch014: gdb-add-index.patch
# Backport of upstream commit 36fb20fa93484b104d. This is not really
# relevant for our branch, but later commits that are important, and
@@ -93,17 +88,17 @@ Patch015: gdb-add-index.patch
#
# Change-Id: I4e25ec26ab06636629adebd02ceb161ee31c232d
# Approved-by: Kevin Buettner <kevinb@redhat.com>
-Patch016: gdb-remove-qnx-neutrino-support.patch
+Patch015: gdb-remove-qnx-neutrino-support.patch
# Backport patches related to build-id usage when opening a core
# file, and also improving general build-id based lookup. These will
# all drop out when rebasing to GDB 16.
-Patch017: gdb-backport-buildid-related-changes.patch
+Patch016: gdb-backport-buildid-related-changes.patch
# Not a backport. Add a new script which hooks into GDB and suggests
# RPMs to install when GDB finds an objfile with no debug info.
-Patch018: gdb-add-rpm-suggestion-script.patch
+Patch017: gdb-add-rpm-suggestion-script.patch
-Patch019: gdb-catchpoint-re-set.patch
+Patch018: gdb-catchpoint-re-set.patch
diff --git a/_gdb.spec.patch.include b/_gdb.spec.patch.include
index d7ff752..6440154 100644
--- a/_gdb.spec.patch.include
+++ b/_gdb.spec.patch.include
@@ -16,4 +16,3 @@
%patch -p1 -P016
%patch -p1 -P017
%patch -p1 -P018
-%patch -p1 -P019
diff --git a/_patch_order b/_patch_order
index 9e7314b..2fe83cc 100644
--- a/_patch_order
+++ b/_patch_order
@@ -8,7 +8,6 @@ gdb-6.8-bz466901-backtrace-full-prelinked.patch
gdb-archer-next-over-throw-cxx-exec.patch
gdb-test-bt-cfi-without-die.patch
gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch
-gdb-rhbz1156192-recursive-dlopen-test.patch
gdb-rhbz1149205-catch-syscall-after-fork-test.patch
gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch
gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
diff --git a/gdb-rhbz1156192-recursive-dlopen-test.patch b/gdb-rhbz1156192-recursive-dlopen-test.patch
deleted file mode 100644
index 2ff58ed..0000000
--- a/gdb-rhbz1156192-recursive-dlopen-test.patch
+++ /dev/null
@@ -1,365 +0,0 @@
-From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
-From: Fedora GDB patches <invalid@email.com>
-Date: Fri, 27 Oct 2017 21:07:50 +0200
-Subject: gdb-rhbz1156192-recursive-dlopen-test.patch
-
-;; Testcase for '[SAP] Recursive dlopen causes SAP HANA installer to
-;; crash.' (RH BZ 1156192).
-;;=fedoratest
-
-diff --git a/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libbar.c b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libbar.c
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libbar.c
-@@ -0,0 +1,30 @@
-+/* Testcase for recursive dlopen calls.
-+
-+ Copyright (C) 2014 Free Software Foundation, Inc.
-+
-+ This file is part of GDB.
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
-+
-+/* This test was copied from glibc's testcase called
-+ <dlfcn/tst-rec-dlopen.c> and related files. */
-+
-+#include <stdio.h>
-+#include <stdlib.h>
-+
-+void
-+bar (void)
-+{
-+ printf ("Called bar.\n");
-+}
-diff --git a/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libfoo.c b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libfoo.c
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libfoo.c
-@@ -0,0 +1,30 @@
-+/* Testcase for recursive dlopen calls.
-+
-+ Copyright (C) 2014 Free Software Foundation, Inc.
-+
-+ This file is part of GDB.
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
-+
-+/* This test was copied from glibc's testcase called
-+ <dlfcn/tst-rec-dlopen.c> and related files. */
-+
-+#include <stdio.h>
-+#include <stdlib.h>
-+
-+void
-+foo (void)
-+{
-+ printf ("Called foo.\n");
-+}
-diff --git a/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.c b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.c
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.c
-@@ -0,0 +1,125 @@
-+/* Testcase for recursive dlopen calls.
-+
-+ Copyright (C) 2014 Free Software Foundation, Inc.
-+
-+ This file is part of GDB.
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
-+
-+/* This test was copied from glibc's testcase called
-+ <dlfcn/tst-rec-dlopen.c> and related files. */
-+
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <malloc.h>
-+#include <dlfcn.h>
-+
-+#define DSO "gdb-rhbz1156192-recursive-dlopen-libfoo.so"
-+#define FUNC "foo"
-+
-+#define DSO1 "gdb-rhbz1156192-recursive-dlopen-libbar.so"
-+#define FUNC1 "bar"
-+
-+/* Prototype for my hook. */
-+void *custom_malloc_hook (size_t, const void *);
-+
-+/* Pointer to old malloc hooks. */
-+void *(*old_malloc_hook) (size_t, const void *);
-+
-+/* Call function func_name in DSO dso_name via dlopen. */
-+void
-+call_func (const char *dso_name, const char *func_name)
-+{
-+ int ret;
-+ void *dso;
-+ void (*func) (void);
-+ char *err;
-+
-+ /* Open the DSO. */
-+ dso = dlopen (dso_name, RTLD_NOW|RTLD_GLOBAL);
-+ if (dso == NULL)
-+ {
-+ err = dlerror ();
-+ fprintf (stderr, "%s\n", err);
-+ exit (1);
-+ }
-+ /* Clear any errors. */
-+ dlerror ();
-+
-+ /* Lookup func. */
-+ *(void **) (&func) = dlsym (dso, func_name);
-+ if (func == NULL)
-+ {
-+ err = dlerror ();
-+ if (err != NULL)
-+ {
-+ fprintf (stderr, "%s\n", err);
-+ exit (1);
-+ }
-+ }
-+ /* Call func twice. */
-+ (*func) ();
-+
-+ /* Close the library and look for errors too. */
-+ ret = dlclose (dso);
-+ if (ret != 0)
-+ {
-+ err = dlerror ();
-+ fprintf (stderr, "%s\n", err);
-+ exit (1);
-+ }
-+
-+}
-+
-+/* Empty hook that does nothing. */
-+void *
-+custom_malloc_hook (size_t size, const void *caller)
-+{
-+ void *result;
-+ /* Restore old hooks. */
-+ __malloc_hook = old_malloc_hook;
-+ /* First call a function in another library via dlopen. */
-+ call_func (DSO1, FUNC1);
-+ /* Called recursively. */
-+ result = malloc (size);
-+ /* Restore new hooks. */
-+ old_malloc_hook = __malloc_hook;
-+ __malloc_hook = custom_malloc_hook;
-+ return result;
-+}
-+
-+int
-+main (void)
-+{
-+
-+ /* Save old hook. */
-+ old_malloc_hook = __malloc_hook;
-+ /* Install new hook. */
-+ __malloc_hook = custom_malloc_hook;
-+
-+ /* Attempt to dlopen a shared library. This dlopen will
-+ trigger an access to the ld.so.cache, and that in turn
-+ will require a malloc to duplicate data in the cache.
-+ The malloc will call our malloc hook which calls dlopen
-+ recursively, and upon return of this dlopen the non-ref
-+ counted ld.so.cache mapping will be unmapped. We will
-+ return to the original dlopen and crash trying to access
-+ dlopened data. */
-+ call_func (DSO, FUNC);
-+
-+ /* Restore old hook. */
-+ __malloc_hook = old_malloc_hook;
-+
-+ return 0;
-+}
-diff --git a/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.exp b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.exp
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.exp
-@@ -0,0 +1,151 @@
-+# Copyright 2014 Free Software Foundation, Inc.
-+#
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3 of the License, or
-+# (at your option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+# GNU General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+require allow_shlib_tests
-+require !use_gdb_stub
-+
-+# Library foo
-+set libname1 "gdb-rhbz1156192-recursive-dlopen-libfoo"
-+set srcfile_lib1 ${srcdir}/${subdir}/${libname1}.c
-+set binfile_lib1 [standard_output_file ${libname1}.so]
-+# Library bar
-+set libname2 "gdb-rhbz1156192-recursive-dlopen-libbar"
-+set srcfile_lib2 ${srcdir}/${subdir}/${libname2}.c
-+set binfile_lib2 [standard_output_file ${libname2}.so]
-+
-+set testfile "gdb-rhbz1156192-recursive-dlopen"
-+set srcfile ${testfile}.c
-+set executable ${testfile}
-+set binfile [standard_output_file ${executable}]
-+
-+if { [gdb_compile_shlib ${srcfile_lib1} ${binfile_lib1} \
-+ { debug "additional_flags=-fPIC" }] != "" } {
-+ untested "Could not compile ${binfile_lib1}"
-+ return -1
-+}
-+
-+if { [gdb_compile_shlib ${srcfile_lib2} ${binfile_lib2} \
-+ { debug "additional_flags=-fPIC" }] != "" } {
-+ untested "Could not compile ${binfile_lib2}"
-+ return -1
-+}
-+
-+if { [prepare_for_testing ${testfile}.exp ${executable} ${srcfile} \
-+ [ list debug shlib_load "additional_flags=-Wno-deprecated-declarations" ]] } {
-+ untested "Could not compile ${executable}"
-+ return -1
-+}
-+
-+set supported 0
-+gdb_test_multiple "run" "initial trial run" {
-+ -re "warning: Corrupted shared library list: \[^\r\n\]+\r\n" {
-+ exp_continue
-+ }
-+ -re -wrap "exited normally.*" {
-+ set supported 1
-+ pass $gdb_test_name
-+ }
-+ -re -wrap "exited with code.*" {
-+ untested "failed at $gdb_test_name"
-+ }
-+}
-+
-+if { $supported == 0 } {
-+ return -1
-+}
-+
-+proc do_test { has_libfoo has_libbar } {
-+ global hex binfile_lib2 binfile_lib1 gdb_prompt
-+ set libbar_match "[string_to_regexp $binfile_lib2]"
-+ set libfoo_match "[string_to_regexp $binfile_lib1]"
-+
-+ gdb_test_multiple "info shared" "info shared" {
-+ -re ".*$libfoo_match\r\n.*$libbar_match\(\r\n.*Shared library is missing\)?.*\r\n${gdb_prompt} $" {
-+ if { $has_libfoo && $has_libbar } {
-+ pass "matched libfoo and libbar"
-+ } else {
-+ fail "matched libfoo and libbar (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
-+ }
-+ }
-+ -re ".*$libfoo_match\(\r\n.*Shared library is missing\)?.*\r\n${gdb_prompt} $" {
-+ if { $has_libfoo && !$has_libbar } {
-+ pass "matched libfoo"
-+ } else {
-+ fail "matched libfoo (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
-+ }
-+ }
-+ -re ".*$libbar_match\(\r\n.*Shared library is missing\)?.*\r\n${gdb_prompt} $" {
-+ if { $has_libbar && !$has_libfoo } {
-+ pass "matched libbar"
-+ } else {
-+ fail "matched libbar (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
-+ }
-+ }
-+ "\r\n${gdb_prompt} $" {
-+ if { !$has_libfoo && !$has_libbar } {
-+ pass "did not match libfoo nor libbar"
-+ } else {
-+ fail "did not match libfoo nor libbar (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
-+ }
-+ }
-+ }
-+}
-+
-+proc test_stop_on_solib_events { } {
-+ set pass 0
-+ # This variable holds the information about whether libfoo and
-+ # libbar (respectively) are expected in the "info shared" output.
-+ set solib_event_order { { 0 0 } { 0 0 } { 0 0 } { 0 1 } \
-+ { 0 1 } { 0 0 } { 0 0 } { 0 1 } \
-+ { 0 1 } { 0 0 } { 0 0 } { 0 1 } \
-+ { 0 1 } { 0 0 } { 0 0 1 } { 1 1 } \
-+ { 1 1 } { 1 0 } { 1 0 } { 1 1 } \
-+ { 1 1 } { 1 0 1 } { 1 0 } { 1 0 } }
-+
-+ with_test_prefix "stop-on-solib-events" {
-+ gdb_test_no_output "set stop-on-solib-events 1" "setting stop-on-solib-events"
-+
-+ gdb_run_cmd
-+ gdb_test "" "Wait for first prompt"
-+ foreach l $solib_event_order {
-+ incr pass
-+ with_test_prefix "pass #$pass" {
-+ set should_be_corrupted [expr 0+0[lindex $l 2]]
-+ do_test [lindex $l 0] [lindex $l 1]
-+
-+ set corrupted 0
-+ gdb_test_multiple "continue" "" {
-+ -re "\r\nwarning: Corrupted shared library list:\[^\r\n\]+(?=\r\n)" {
-+ set corrupted 1
-+ }
-+ -re -wrap "\r\nStopped due to shared library event.*" {
-+ pass $gdb_test_name
-+ }
-+ }
-+
-+ gdb_assert {$corrupted == $should_be_corrupted} \
-+ "corrupted=$corrupted but should_be_corrupted=$should_be_corrupted"
-+ }
-+ }
-+
-+ # In the last pass we do not expect to see libfoo or libbar.
-+ incr pass
-+ with_test_prefix "pass #$pass" {
-+ do_test 0 0
-+ }
-+ }
-+}
-+
-+test_stop_on_solib_events
diff --git a/gdb.spec b/gdb.spec
index d082119..7188f2e 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -928,6 +928,9 @@ fi
# endif scl
%changelog
+* Thu Jan 02 2025 Guinevere Larsen <glarsen@redhat.com>
+- Remove gdb-rhbz1156192-recursive-dlopen-test.patch.
+
* Thu Jan 02 2025 Andrew Burgess <aburgess@redhat.com>
- Update generate-patches-from-git-repo.sh script, and regenerate
patches. This changed gdb-add-rpm-suggestion-script.patch,
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-28 0:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-28 0:01 [rpms/gdb] gdb-17.2-rebase-f44: Remove gdb-rhbz1156192-recursive-dlopen-test.patch Guinevere Larsen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox