From a09fdbdf24c0f7d8a6f5ae1298a387a185bdb748 Mon Sep 17 00:00:00 2001 From: Stan Cox Date: Fri, 4 Dec 2020 16:18:54 -0500 Subject: [PATCH 01/55] Resolves: #1889545 --- dyninst.spec | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dyninst.spec b/dyninst.spec index cf7facd..b86cc6b 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -1,7 +1,7 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst -Release: 2%{?dist} +Release: 1%{?dist} URL: http://www.dyninst.org Version: 10.2.1 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 @@ -186,10 +186,7 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog -* Tue Nov 10 2020 Stan Cox - 10.2.1-2 -- Enable debuginfod - -* Wed Oct 28 2020 Stan Cox - 10.2.1-1 +* Mon Dec 07 2020 Stan Cox - 10.2.1-1 - Update to 10.2.1 * Tue Oct 27 2020 Jeff Law - 10.2.0-2 From 570c7ab5bb2a25c2380afa11dd2ca070ddd2983d Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Thu, 17 Dec 2020 04:51:12 +0000 Subject: [PATCH 02/55] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- dyninst.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/dyninst.spec b/dyninst.spec index cf7facd..9631839 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -32,6 +32,7 @@ BuildRequires: tex-latex # Extra requires just for the testsuite BuildRequires: gcc-gfortran libxml2-devel +BuildRequires: make # Testsuite files should not provide/require anything %{?filter_setup: From 9821229e2ea901c6f3051cd0202e103c3a0d359f Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Fri, 22 Jan 2021 20:51:35 +0000 Subject: [PATCH 03/55] Rebuilt for Boost 1.75 --- dyninst.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dyninst.spec b/dyninst.spec index 9631839..0f31243 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -1,7 +1,7 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst -Release: 2%{?dist} +Release: 3%{?dist} URL: http://www.dyninst.org Version: 10.2.1 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 @@ -187,6 +187,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Fri Jan 22 2021 Jonathan Wakely - 10.2.1-3 +- Rebuilt for Boost 1.75 + * Tue Nov 10 2020 Stan Cox - 10.2.1-2 - Enable debuginfod From d64c178af3c37b4767e445704d15ffb20c23fd74 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 04:10:51 +0000 Subject: [PATCH 04/55] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- dyninst.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dyninst.spec b/dyninst.spec index 0f31243..b8ad5aa 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -1,7 +1,7 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst -Release: 3%{?dist} +Release: 4%{?dist} URL: http://www.dyninst.org Version: 10.2.1 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 @@ -187,6 +187,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 10.2.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Fri Jan 22 2021 Jonathan Wakely - 10.2.1-3 - Rebuilt for Boost 1.75 From 63c540813ba23d9ce736d64bfb0412d833a311d3 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Fri, 29 Jan 2021 13:35:40 -0500 Subject: [PATCH 05/55] respin --- dyninst.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dyninst.spec b/dyninst.spec index b8ad5aa..0991e0d 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -1,7 +1,7 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst -Release: 4%{?dist} +Release: 5%{?dist} URL: http://www.dyninst.org Version: 10.2.1 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 @@ -23,7 +23,7 @@ BuildRequires: gcc-c++ BuildRequires: elfutils-devel BuildRequires: elfutils-libelf-devel BuildRequires: elfutils-debuginfod-client-devel -BuildRequires: boost-devel +BuildRequires: boost-devel >= 1.75 BuildRequires: binutils-devel BuildRequires: cmake BuildRequires: libtirpc-devel @@ -187,6 +187,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Fri Jan 29 2021 Frank Ch. Eigler - 10.2.1-5 +- Rebuilt for Boost 1.75 for sure, via buildrequire version constraints + * Tue Jan 26 2021 Fedora Release Engineering - 10.2.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 36f9c5a1f59da26c69ccfcb5efddfd5b6b0d5f29 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 30 Mar 2021 19:35:59 +0100 Subject: [PATCH 06/55] Rebuilt for removed libstdc++ symbol (#1937698) --- dyninst.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dyninst.spec b/dyninst.spec index 0991e0d..34b1aeb 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -1,7 +1,7 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst -Release: 5%{?dist} +Release: 6%{?dist} URL: http://www.dyninst.org Version: 10.2.1 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 @@ -187,6 +187,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Tue Mar 30 2021 Jonathan Wakely - 10.2.1-6 +- Rebuilt for removed libstdc++ symbol (#1937698) + * Fri Jan 29 2021 Frank Ch. Eigler - 10.2.1-5 - Rebuilt for Boost 1.75 for sure, via buildrequire version constraints From 2eb398d8d5f5298559500d06a7e478b7dfa6318d Mon Sep 17 00:00:00 2001 From: Martin Cermak Date: Wed, 21 Apr 2021 15:27:19 +0200 Subject: [PATCH 07/55] Enable CI gating --- .fmf/version | 1 + gating.yaml | 20 ++ plans/ci.fmf | 6 + .../Sanity/smoke-test/dynamic-double/Makefile | 19 ++ .../smoke-test/dynamic-double/mutatee.cpp | 49 +++++ .../smoke-test/dynamic-double/mutator.cpp | 115 ++++++++++ tests/Sanity/smoke-test/dynamic/Makefile | 17 ++ tests/Sanity/smoke-test/dynamic/load_env.sh | 6 + tests/Sanity/smoke-test/dynamic/mutatee.cpp | 44 ++++ tests/Sanity/smoke-test/dynamic/mutator.cpp | 73 ++++++ tests/Sanity/smoke-test/main.fmf | 16 ++ tests/Sanity/smoke-test/runtest.sh | 207 ++++++++++++++++++ tests/Sanity/smoke-test/static/Makefile | 17 ++ tests/Sanity/smoke-test/static/load_env.sh | 6 + tests/Sanity/smoke-test/static/mutatee.cpp | 32 +++ tests/Sanity/smoke-test/static/mutator.cpp | 69 ++++++ 16 files changed, 697 insertions(+) create mode 100644 .fmf/version create mode 100644 gating.yaml create mode 100644 plans/ci.fmf create mode 100644 tests/Sanity/smoke-test/dynamic-double/Makefile create mode 100644 tests/Sanity/smoke-test/dynamic-double/mutatee.cpp create mode 100644 tests/Sanity/smoke-test/dynamic-double/mutator.cpp create mode 100644 tests/Sanity/smoke-test/dynamic/Makefile create mode 100644 tests/Sanity/smoke-test/dynamic/load_env.sh create mode 100644 tests/Sanity/smoke-test/dynamic/mutatee.cpp create mode 100644 tests/Sanity/smoke-test/dynamic/mutator.cpp create mode 100644 tests/Sanity/smoke-test/main.fmf create mode 100755 tests/Sanity/smoke-test/runtest.sh create mode 100644 tests/Sanity/smoke-test/static/Makefile create mode 100644 tests/Sanity/smoke-test/static/load_env.sh create mode 100644 tests/Sanity/smoke-test/static/mutatee.cpp create mode 100644 tests/Sanity/smoke-test/static/mutator.cpp diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..84b7773 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,20 @@ +--- !Policy +product_versions: + - fedora-* +decision_context: bodhi_update_push_stable +subject_type: koji_build +rules: + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} + - !PassingTestCaseRule {test_case_name: baseos-qe.koji-build.scratch-build.validation} +--- !Policy +product_versions: + - rhel-8 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional} +--- !Policy +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional} diff --git a/plans/ci.fmf b/plans/ci.fmf new file mode 100644 index 0000000..1ad2c12 --- /dev/null +++ b/plans/ci.fmf @@ -0,0 +1,6 @@ +summary: CI Gating Plan +discover: + how: fmf + directory: tests +execute: + how: beakerlib diff --git a/tests/Sanity/smoke-test/dynamic-double/Makefile b/tests/Sanity/smoke-test/dynamic-double/Makefile new file mode 100644 index 0000000..22c77b3 --- /dev/null +++ b/tests/Sanity/smoke-test/dynamic-double/Makefile @@ -0,0 +1,19 @@ +CPP=g++ +#DYNINST_ROOT=/opt/rh/devtoolset-2/root/usr/lib$(BITS)/dyninst +LINK=-L/opt/rh/devtoolset-3/root/usr/lib$(BITS)/dyninst -L/opt/rh/devtoolset-3/root/usr/lib$(BITS)/dyninst/lib +# -ldyninstAPI -ldynC -ldl +#LINK=-L/opt/rh/devtoolset-2/root/usr/lib$(BITS)/dyninst -L/opt/rh/devtoolset-2/root/usr/lib$(BITS)/dyninst/lib -ldyninstAPI -ldl + +INCLUDE=-I/opt/rh/devtoolset-3/root/usr/include/dyninst +LINK2=-ldyninstAPI -ldl -lboost_system + +all: mutatee mutator + +clean: + rm mutatee mutator + +mutatee: mutatee.cpp + $(CPP) -g -o mutatee mutatee.cpp + +mutator: mutator.cpp + $(CPP) -g -o mutator $(INCLUDE) $(LINK) $(LINK2) mutator.cpp diff --git a/tests/Sanity/smoke-test/dynamic-double/mutatee.cpp b/tests/Sanity/smoke-test/dynamic-double/mutatee.cpp new file mode 100644 index 0000000..eead3bb --- /dev/null +++ b/tests/Sanity/smoke-test/dynamic-double/mutatee.cpp @@ -0,0 +1,49 @@ +#include +#include +#include + +using namespace std; + +int a = 0; + +void incr(void) +{ + a++; +} + +void incr2(void) +{ + a += 100; +} + +int function_name(void) +{ + fprintf(stderr, "FUNCTION EXECUTED. VALUE = %i\n", a); +} + +int main(int argc, char **argv) +{ + int n = 10, i; + FILE *f = fopen("RESULT.log", "w"); + if(argc > 1) + { + if((n = atoi(argv[1])) <= 0) + n = 10; + } + else + n = 10; + + for(i = 0; i < n; i++) + { + function_name(); + sleep(3); + } + + if((a > 200) && (a % 100 > 0)) + fprintf(f, "MUTATION OK.\n"); + else + fprintf(f, "MUTATION FAILED.\n"); + + fclose(f); + return !a; +} diff --git a/tests/Sanity/smoke-test/dynamic-double/mutator.cpp b/tests/Sanity/smoke-test/dynamic-double/mutator.cpp new file mode 100644 index 0000000..550ccbe --- /dev/null +++ b/tests/Sanity/smoke-test/dynamic-double/mutator.cpp @@ -0,0 +1,115 @@ +#include +#include +#include +#include +#include + +// dyninst libraries + +#include "BPatch.h" +#include "BPatch_addressSpace.h" +#include "BPatch_process.h" +#include "BPatch_function.h" +#include "BPatch_point.h" +//#include "BPatch_flowGraph.h" + +using namespace std; + + + + +int main(int argc, char **argv) +{ + BPatch bpatch1, bpatch2; + int pid; + BPatch_process *app_proc; + BPatch_addressSpace *aspace; + BPatch_image *image; + + // check the options + if(argc != 2) + { + cerr << "ERROR ## Missing command line args. Use PID of the process you want to attach.\n"; + return 1; + } + + pid = atoi(argv[1]); + if(pid == 0) + { + cerr << "ERROR ## Wrong PID " << pid << ", please use another.\n"; + return 2; + } + + cerr << "TAKE1 A\n"; + // let's go... + app_proc = bpatch1.processAttach(NULL, pid); + cerr << "TAKE1 B\n"; + aspace = app_proc; + cerr << "TAKE1 C\n"; + image = aspace->getImage(); + cerr << "TAKE1 D\n"; + +/* BPatch_Set access_types; + access_types.insert(BPatch_opLoad); + access_types.insert(BPatch_opStore); +*/ + vector functions, incr_functions; + vector *points; + image->findFunction("function_name", functions); + cerr << "TAKE1 E\n"; + points = functions[0]->findPoint(BPatch_entry); + cerr << "TAKE1 F\n"; + + // create snippet + image->findFunction("incr", incr_functions); + cerr << "TAKE1 G\n"; + vector incr_args; + BPatch_funcCallExpr incr_call(*(incr_functions[0]), incr_args); + + aspace->insertSnippet(incr_call, *points); + cerr << "TAKE1 H\n"; + app_proc->continueExecution(); + cerr << "TAKE1 I\n"; + sleep(4); + app_proc->detach(true); + + cout << "FIRST MUTATION DONE. MUTATOR IS DOING THE SECOND ONE...\n"; + + sleep(4); + + cerr << "TAKE2 A\n"; + // let's go... + app_proc = bpatch2.processAttach(NULL, pid); + cerr << "TAKE2 B\n"; + aspace = app_proc; + cerr << "TAKE2 C\n"; + image = aspace->getImage(); + cerr << "TAKE2 D\n"; + +/* BPatch_Set access_types; + access_types.insert(BPatch_opLoad); + access_types.insert(BPatch_opStore); +*/ + vector functions2, incr_functions2; + vector *points2;; + image->findFunction("function_name", functions2); + cerr << "TAKE2 E\n"; + points2 = functions2[0]->findPoint(BPatch_exit); + cerr << "TAKE2 F\n"; + + // create snippet + image->findFunction("incr2", incr_functions2); + cerr << "TAKE2 G\n"; + vector incr_args2; + BPatch_funcCallExpr incr_call2(*(incr_functions2[0]), incr_args2); + + aspace->insertSnippet(incr_call2, *points2); + cerr << "TAKE2 H\n"; + app_proc->continueExecution(); + cerr << "TAKE2 I\n"; + app_proc->detach(true); + + cout << "SECOND MUTATION DONE. MUTATOR IS GOING...\n"; + + return 0; +} diff --git a/tests/Sanity/smoke-test/dynamic/Makefile b/tests/Sanity/smoke-test/dynamic/Makefile new file mode 100644 index 0000000..aaecdd6 --- /dev/null +++ b/tests/Sanity/smoke-test/dynamic/Makefile @@ -0,0 +1,17 @@ +CPP=g++ +#DYNINST_ROOT=/opt/rh/devtoolset-2/root/usr/lib$(BITS)/dyninst +##LINK=-L/opt/rh/devtoolset-2/root/usr/lib$(BITS)/dyninst -L/opt/rh/devtoolset-2/root/usr/lib$(BITS)/dyninst/lib -ldyninstAPI -ldynC -ldl +#LINK=-L/opt/rh/devtoolset-2/root/usr/lib$(BITS)/dyninst -L/opt/rh/devtoolset-2/root/usr/lib$(BITS)/dyninst/lib -ldyninstAPI -ldl +#INCLUDE=-I/opt/rh/devtoolset-2/root/usr/include/dyninst +LINK2=-ldyninstAPI -ldl -lboost_system + +all: mutatee mutator + +clean: + rm mutatee mutator + +mutatee: mutatee.cpp + $(CPP) -g -o mutatee mutatee.cpp + +mutator: mutator.cpp + $(CPP) -g -o mutator $(INCLUDE) $(LINK) $(LINK2) mutator.cpp diff --git a/tests/Sanity/smoke-test/dynamic/load_env.sh b/tests/Sanity/smoke-test/dynamic/load_env.sh new file mode 100644 index 0000000..ce686f0 --- /dev/null +++ b/tests/Sanity/smoke-test/dynamic/load_env.sh @@ -0,0 +1,6 @@ +DYNINSTAPI_RT_LIB=/opt/rh/devtoolset-3/root/usr/lib64/dyninst/libdyninstAPI_RT.so +export DYNINSTAPI_RT_LIB +if [[ ! $LD_LIBRARY_PATH =~ .*dyninst.* ]]; then + LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LD_LIBRARY_PATH/dyninst +fi +export LD_LIBRARY_PATH diff --git a/tests/Sanity/smoke-test/dynamic/mutatee.cpp b/tests/Sanity/smoke-test/dynamic/mutatee.cpp new file mode 100644 index 0000000..111b0ab --- /dev/null +++ b/tests/Sanity/smoke-test/dynamic/mutatee.cpp @@ -0,0 +1,44 @@ +#include +#include +#include + +using namespace std; + +int a = 0; + +void incr(void) +{ + a++; +} + +int function_name(void) +{ + fprintf(stderr, "FUNCTION EXECUTED. VALUE = %i\n", a); +} + +int main(int argc, char **argv) +{ + int n = 10, i; + FILE *f = fopen("RESULT.log", "w"); + if(argc > 1) + { + if((n = atoi(argv[1])) <= 0) + n = 10; + } + else + n = 10; + + for(i = 0; i < n; i++) + { + function_name(); + sleep(3); + } + + if(a) + fprintf(f, "MUTATION OK.\n"); + else + fprintf(f, "MUTATION FAILED.\n"); + + fclose(f); + return !a; +} diff --git a/tests/Sanity/smoke-test/dynamic/mutator.cpp b/tests/Sanity/smoke-test/dynamic/mutator.cpp new file mode 100644 index 0000000..ed540f2 --- /dev/null +++ b/tests/Sanity/smoke-test/dynamic/mutator.cpp @@ -0,0 +1,73 @@ +#include +#include +#include +#include +#include + +// dyninst libraries + +#include "BPatch.h" +#include "BPatch_addressSpace.h" +#include "BPatch_process.h" +#include "BPatch_function.h" +#include "BPatch_point.h" +//#include "BPatch_flowGraph.h" + +using namespace std; + + +BPatch bpatch; + + +int main(int argc, char **argv) +{ + int pid; + BPatch_process *app_proc; + BPatch_addressSpace *aspace; + BPatch_image *image; + + // check the options + if(argc != 2) + { + cerr << "ERROR ## Missing command line args. Use PID of the process you want to attach.\n"; + return 1; + } + + pid = atoi(argv[1]); + if(pid == 0) + { + cerr << "ERROR ## Wrong PID " << pid << ", please use another.\n"; + return 2; + } + + // let's go... + app_proc = bpatch.processAttach(NULL, pid); + aspace = app_proc; + image = aspace->getImage(); + +/* BPatch_Set access_types; + access_types.insert(BPatch_opLoad); + access_types.insert(BPatch_opStore); +*/ + vector functions, incr_functions; + vector *points; + image->findFunction("function_name", functions); + points = functions[0]->findPoint(BPatch_entry); + + // create snippet + image->findFunction("incr", incr_functions); + vector incr_args; + BPatch_funcCallExpr incr_call(*(incr_functions[0]), incr_args); + + aspace->insertSnippet(incr_call, *points); + app_proc->continueExecution(); +#ifdef __PPC__ + // PPC detach removes snippets, so wait + bpatch.waitForStatusChange(); +#endif + app_proc->detach(true); + + cout << "MUTATION DONE. MUTATOR IS GOING...\n"; + + return 0; +} diff --git a/tests/Sanity/smoke-test/main.fmf b/tests/Sanity/smoke-test/main.fmf new file mode 100644 index 0000000..0670d38 --- /dev/null +++ b/tests/Sanity/smoke-test/main.fmf @@ -0,0 +1,16 @@ +summary: The test does basic instrumentation on binaries. +description: '' +contact: +- Michael Petlan +component: +- dyninst +test: ./runtest.sh +framework: beakerlib +recommend: +- dyninst +- dyninst-devel +- gcc +- gcc-c++ +duration: 12m +extra-summary: /tools/dyninst/Sanity/smoke-test +extra-task: /tools/dyninst/Sanity/smoke-test diff --git a/tests/Sanity/smoke-test/runtest.sh b/tests/Sanity/smoke-test/runtest.sh new file mode 100755 index 0000000..88792a4 --- /dev/null +++ b/tests/Sanity/smoke-test/runtest.sh @@ -0,0 +1,207 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/dyninst/Sanity/smoke-test +# Description: The test does basic instrumentation on binaries. +# Author: Michael Petlan +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2013 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# 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, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="dyninst" + +rlJournalStart + rlPhaseStartSetup + rlRun "TMPD=$(mktemp -d)" + rlRun "cp -r dynamic dynamic-double static $TMPD/" + rlRun "pushd $TMPD" + # load the proper environment - set the variables + # When using dyninst, we have to have LD_LIBRARY_PATH set to dyninst's directory + # and DYNINSTAPI_RT_LIB should keep the path of libdyninstAPI_RT.so.8.0 shared library. + # After having this set properly, an application what uses dyninst, can be compiled and run. + + test -e "/usr/lib64" && BITS="64" || BITS="" + ARCH=`rlGetPrimaryArch` + + rlAssertRpm $PACKAGE + DYNINST_ROOT="/usr/lib$BITS/dyninst" + INCLUDE="-I/usr/include/dyninst" + LINK="-L/usr/lib$BITS/dyninst -L/usr/lib$BITS/dyninst/lib" + echo $LD_LIBRARY_PATH | grep "$DYNINST_ROOT" + if [ $? -ne 0 ]; then + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DYNINST_ROOT" + fi + + # the API runtime library path should be available from rpmquery + if [ `rpmquery -l $PACKAGE.$ARCH | grep API_RT | wc -l` -eq 1 ]; then + # if there's only one file, we may accept that + DYNINSTAPI_RT_LIB=`rpmquery -l $PACKAGE.$ARCH | grep API_RT` + else + # sometimes there're many links to the API_RT lib, so we have to choose the proper file + for rtlib in `rpmquery -l $PACKAGE.$ARCH | grep API_RT`; do + test -L $rtlib || DYNINSTAPI_RT_LIB="$rtlib" + done + fi + export DYNINSTAPI_RT_LIB + if [[ ! $LD_LIBRARY_PATH =~ .*dyninst.* ]]; then + LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LD_LIBRARY_PATH/dyninst + fi + export LD_LIBRARY_PATH + + # compile both static and dynamic test + for TC in static dynamic dynamic-double; do + cd $TC + rlRun "make BITS=\"$BITS\" DYNINST_ROOT=\"$DYNINST_ROOT\" INCLUDE=\"$INCLUDE\" LINK=\"$LINK\"" 0 "Compiling $TC dyninst example." + cd .. + done + + # IMPORTANT: We have to make sure, that some SELinux bools are set right (see dyninst docs) + # + # We need: + # allow_execmod --> on + # allow_execstack --> on + # deny_ptrace --> off + # + # Note: The bool deny_ptrace is not present in RHEL yet. + # + SELINUX_STATUS=`sestatus | grep "SELinux status" | awk '{ print $3; }'` + if [[ "$SELINUX_STATUS" == "enabled" ]]; then + rlLog "SELINUX IS ENABLED." + SEBOOL_ALLOW_EXECMOD=`getsebool allow_execmod` + SEBOOL_ALLOW_EXECSTACK=`getsebool allow_execstack` + SEBOOL_DENY_PTRACE=`getsebool deny_ptrace` + if [[ "$SEBOOL_ALLOW_EXECMOD" =~ "> off" ]]; then + rlLog "SELINUX: We need to set allow_execmod to on." + setsebool allow_execmod on + SEBOOL_ALLOW_EXECMOD="off" + else + rlLog "SELINUX: $SEBOOL_ALLOW_EXECMOD -- already OK." + fi + if [[ "$SEBOOL_ALLOW_EXECSTACK" =~ "> off" ]]; then + rlLog "SELINUX: We need to set allow_execstack to on." + setsebool allow_execstack on + SEBOOL_ALLOW_EXECSTACK="off" + else + rlLog "SELINUX: $SEBOOL_ALLOW_EXECSTACK -- already OK." + fi + if [[ "$SEBOOL_DENY_PTRACE" =~ "> on" ]]; then + rlLog "SELINUX: We need to set deny_ptrace to off." + setsebool deny_ptrace off + SEBOOL_DENY_PTRACE="on" + else + if [ -z "$SEBOOL_DENY_PTRACE" ]; then + rlLog "SELINUX: deny_ptrace does not exist -- OK." + else + rlLog "SELINUX: $SEBOOL_DENY_PTRACE -- already OK." + fi + fi + else + rlLog "SELINUX IS DISABLED. We do not have to change anything." + fi + + # Checking for lahf instruction support (bz1134843 workaround) + ARCH=`uname -i` + if [[ "$ARCH" =~ "86" ]]; then + IS_LAHF_SUPPORTED=`cat /proc/cpuinfo | grep lahf` + if [ -z "$IS_LAHF_SUPPORTED" ]; then + rlLogWarning "The CPU does not support needed LAHF instruction." + fi + fi + rlPhaseEnd + + rlPhaseStartTest "Testing static instrumentation" + cd static + rlRun "./mutator" + rlAssertExists "mutated" + RESULT=`./mutated` + if [[ "$RESULT" == "MUTATION OK." ]]; then + rlPass "Instrumentation PASSed." + else + rlFail "Instrumentation FAILed." + fi + cd .. + rlPhaseEnd + + rlPhaseStartTest "Testing dynamic instrumentation" + cd dynamic + ./mutatee 10 & + PID=$! + # export DYNINST_DEBUG_STARTUP=1 + # export DYNINST_DEBUG_RTLIB=1 + # export DYNINST_DEBUG_CRASH=1 + # export DYNINST_DEBUG_BPATCH=1 + ./mutator $PID + sleep 50 + RESULT=`cat RESULT.log` + if [[ "$RESULT" == "MUTATION OK." ]]; then + rlPass "Instrumentation PASSed." + else + rlFail "Instrumentation FAILed." + fi + cd .. + rlPhaseEnd + + rlPhaseStartTest "Testing dynamic double instrumentation" + # This case needs to have the DYNINSTAPI_RT_LIB variable pointing to a regular file + # not to symlink. So it has to be hacked a little + export DYNINSTAPI_RT_LIB=`readlink -fn $DYNINSTAPI_RT_LIB` + + cd dynamic-double + ./mutatee 10 & + PID=$! + # export DYNINST_DEBUG_STARTUP=1 + # export DYNINST_DEBUG_RTLIB=1 + # export DYNINST_DEBUG_CRASH=1 + # export DYNINST_DEBUG_BPATCH=1 + ./mutator $PID + sleep 50 + RESULT=`cat RESULT.log` + if [[ "$RESULT" == "MUTATION OK." ]]; then + rlPass "Instrumentation PASSed." + else + rlFail "Instrumentation FAILed." + fi + cd .. + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TMPD" + + # restore the SELinux bools, if they were changed + if [[ "$SEBOOL_ALLOW_EXECMOD" == "off" ]]; then + rlLog "Restoring SELinux bool allow_execmod to $SEBOOL_ALLOW_EXECMOD." + setsebool allow_execmod $SEBOOL_ALLOW_EXECMOD + fi + if [[ "$SEBOOL_ALLOW_EXECSTACK" == "off" ]]; then + rlLog "Restoring SELinux bool allow_execstack to $SEBOOL_ALLOW_EXECSTACK." + setsebool allow_execstack $SEBOOL_ALLOW_EXECSTACK + fi + if [[ "$SEBOOL_DENY_PTRACE" == "on" ]]; then + rlLog "Restoring SELinux bool deny_ptrace to $SEBOOL_DENY_PTRACE." + setsebool deny_ptrace $SEBOOL_DENY_PTRACE + fi + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/tests/Sanity/smoke-test/static/Makefile b/tests/Sanity/smoke-test/static/Makefile new file mode 100644 index 0000000..2277c20 --- /dev/null +++ b/tests/Sanity/smoke-test/static/Makefile @@ -0,0 +1,17 @@ +CPP=g++ +#DYNINST_ROOT=/opt/rh/devtoolset-2/root/usr/lib$(BITS)/dyninst +##LINK=-L/opt/rh/devtoolset-2/root/usr/lib$(BITS)/dyninst -L/opt/rh/devtoolset-2/root/usr/lib$(BITS)/dyninst/lib -ldyninstAPI -ldynC -ldl +#LINK=-L/opt/rh/devtoolset-2/root/usr/lib$(BITS)/dyninst -L/opt/rh/devtoolset-2/root/usr/lib$(BITS)/dyninst/lib -ldyninstAPI -ldl +#INCLUDE=-I/opt/rh/devtoolset-2/root/usr/include/dyninst +LINK2=-ldyninstAPI -ldl -lboost_system + +all: mutatee mutator + +clean: + rm mutatee mutator mutated + +mutatee: mutatee.cpp + $(CPP) -g -o mutatee mutatee.cpp + +mutator: mutator.cpp + $(CPP) -g -o mutator $(INCLUDE) $(LINK) $(LINK2) mutator.cpp diff --git a/tests/Sanity/smoke-test/static/load_env.sh b/tests/Sanity/smoke-test/static/load_env.sh new file mode 100644 index 0000000..ce686f0 --- /dev/null +++ b/tests/Sanity/smoke-test/static/load_env.sh @@ -0,0 +1,6 @@ +DYNINSTAPI_RT_LIB=/opt/rh/devtoolset-3/root/usr/lib64/dyninst/libdyninstAPI_RT.so +export DYNINSTAPI_RT_LIB +if [[ ! $LD_LIBRARY_PATH =~ .*dyninst.* ]]; then + LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LD_LIBRARY_PATH/dyninst +fi +export LD_LIBRARY_PATH diff --git a/tests/Sanity/smoke-test/static/mutatee.cpp b/tests/Sanity/smoke-test/static/mutatee.cpp new file mode 100644 index 0000000..6c3b215 --- /dev/null +++ b/tests/Sanity/smoke-test/static/mutatee.cpp @@ -0,0 +1,32 @@ +#include +#include +#include +#include + +using namespace std; + +int a = 0; + +void incr(void) +{ + a++; +} + +int function_name(void) +{ + int i; + + sleep(3); + + if(a) + printf("MUTATION OK.\n"); + else + printf("MUTATION FAILED.\n"); + + return a; +} + +int main(int argc, char **argv) +{ + function_name(); +} diff --git a/tests/Sanity/smoke-test/static/mutator.cpp b/tests/Sanity/smoke-test/static/mutator.cpp new file mode 100644 index 0000000..e7358db --- /dev/null +++ b/tests/Sanity/smoke-test/static/mutator.cpp @@ -0,0 +1,69 @@ +#include +#include +#include +#include +#include + +// dyninst libraries + +#include "BPatch.h" +#include "BPatch_addressSpace.h" +#include "BPatch_process.h" +#include "BPatch_function.h" +#include "BPatch_point.h" +//#include "BPatch_flowGraph.h" + +using namespace std; + + +BPatch bpatch; + + +int main(int argc, char **argv) +{ + int pid; + BPatch_binaryEdit *app_bin; + BPatch_addressSpace *aspace; + BPatch_image *image; + +/* // check the options + if(argc != 2) + { + cerr << "ERROR ## Missing command line args. Use PID of the process you want to attach.\n"; + return 1; + } + + pid = atoi(argv[1]); + if(pid == 0) + { + cerr << "ERROR ## Wrong PID " << pid << ", please use another.\n"; + return 2; + } +*/ + // let's go... + app_bin = bpatch.openBinary("mutatee"); + aspace = app_bin; + image = aspace->getImage(); + +/* BPatch_Set access_types; + access_types.insert(BPatch_opLoad); + access_types.insert(BPatch_opStore); +*/ + vector functions, incr_functions; + vector *points; + image->findFunction("function_name", functions); + points = functions[0]->findPoint(BPatch_entry); + + // create snippet + image->findFunction("incr", incr_functions); + vector incr_args; + BPatch_funcCallExpr incr_call(*(incr_functions[0]), incr_args); + + aspace->insertSnippet(incr_call, *points); + app_bin->writeFile("mutated"); + + + cout << "MUTATION DONE. MUTATOR IS GOING...\n"; + + return 0; +} From 9ebd1d0187f2a20724b8fd89aee9a2fc48f14493 Mon Sep 17 00:00:00 2001 From: Martin Cermak Date: Wed, 21 Apr 2021 15:30:02 +0200 Subject: [PATCH 08/55] Don't require kernel rebuild test for gating --- gating.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/gating.yaml b/gating.yaml index 84b7773..ce3cdc1 100644 --- a/gating.yaml +++ b/gating.yaml @@ -5,7 +5,6 @@ decision_context: bodhi_update_push_stable subject_type: koji_build rules: - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} - - !PassingTestCaseRule {test_case_name: baseos-qe.koji-build.scratch-build.validation} --- !Policy product_versions: - rhel-8 From 77d455a6b5839995a36c3b264a1aab7a93b73294 Mon Sep 17 00:00:00 2001 From: Stan Cox Date: Fri, 30 Apr 2021 10:09:49 -0400 Subject: [PATCH 09/55] Update to 11.0.0 --- .gitignore | 2 ++ dyninst-11.0.0-dwarf.patch | 11 +++++++++ dyninst.spec | 28 +++++++++++----------- sources | 4 ++-- testsuite-10.1.0-386.patch | 44 ----------------------------------- testsuite-11.0.0-386.patch | 15 ++++++++++++ testsuite-11.0.0-test12.patch | 14 +++++++++++ 7 files changed, 57 insertions(+), 61 deletions(-) create mode 100644 dyninst-11.0.0-dwarf.patch delete mode 100644 testsuite-10.1.0-386.patch create mode 100644 testsuite-11.0.0-386.patch create mode 100644 testsuite-11.0.0-test12.patch diff --git a/.gitignore b/.gitignore index 3fd4028..a0f9540 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,5 @@ /dyninst-10.1.0.tar.gz /dyninst-10.2.0.tar.gz /dyninst-10.2.1.tar.gz +/dyninst-11.0.0.tar.gz +/testsuite-11.0.0.tar.gz diff --git a/dyninst-11.0.0-dwarf.patch b/dyninst-11.0.0-dwarf.patch new file mode 100644 index 0000000..6172a9c --- /dev/null +++ b/dyninst-11.0.0-dwarf.patch @@ -0,0 +1,11 @@ +Remove extraneous error messages of the form: + err message: .debug_loclists section missing + err message: invalid DWARF +which are repeated in some circumstances without adding useful context + +--- dyninst-11.0.0/dyninst-11.0.0/symtabAPI/src/dwarfWalker.C.orig 2021-04-08 16:48:12.000000000 -0400 ++++ dyninst-11.0.0/dyninst-11.0.0/symtabAPI/src/dwarfWalker.C 2021-04-27 12:48:55.643978425 -0400 +@@ -1858,1 +1858,1 @@ +- cerr << "err message: " << dwarf_errmsg(dwarf_errno()) << endl; ++ dwarf_printf("(0x%lx) Error while decoding location: %s\n", id(), dwarf_errmsg(dwarf_errno())); + diff --git a/dyninst.spec b/dyninst.spec index 34b1aeb..1f2e332 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -1,23 +1,20 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst -Release: 6%{?dist} +Release: 1%{?dist} URL: http://www.dyninst.org -Version: 10.2.1 +Version: 11.0.0 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 -%define __testsuite_version 10.1.0 Source0: https://github.com/dyninst/dyninst/archive/v%{version}/dyninst-%{version}.tar.gz -Source1: https://github.com/dyninst/testsuite/archive/v10.1.0/testsuite-%{__testsuite_version}.tar.gz +Source1: https://github.com/dyninst/testsuite/archive/%{version}/testsuite-%{version}.tar.gz -Patch1: %{name}-gcc11.patch -Patch2: %{name}-10.2.1-dbid.patch -Patch3: testsuite-10.1.0-gettid.patch -Patch4: testsuite-10.1.0-386.patch -Patch5: testsuite-10.1.0-throw.patch +Patch1: testsuite-11.0.0-test12.patch +Patch2: testsuite-11.0.0-386.patch +Patch3: dyninst-11.0.0-dwarf.patch %global dyninst_base dyninst-%{version} -%global testsuite_base testsuite-%{__testsuite_version} +%global testsuite_base testsuite-%{version} BuildRequires: gcc-c++ BuildRequires: elfutils-devel @@ -79,11 +76,9 @@ making sure that dyninst works properly. %setup -q -n %{name}-%{version} -c %setup -q -T -D -a 1 -%patch1 -p1 -b .gcc11 -%patch2 -p1 -b .dbid -%patch3 -p1 -b .gettid -%patch4 -p1 -b .386 -%patch5 -p1 -b .throw +%patch1 -p1 -b .test12 +%patch2 -p1 -b .386 +%patch3 -p1 -b .dwarf # cotire seems to cause non-deterministic gcc errors # https://bugzilla.redhat.com/show_bug.cgi?id=1420551 @@ -187,6 +182,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Fri Apr 30 2021 Stan Cox - 11.0.0 +- Update to 11.0.0 + * Tue Mar 30 2021 Jonathan Wakely - 10.2.1-6 - Rebuilt for removed libstdc++ symbol (#1937698) diff --git a/sources b/sources index 3758b48..aef75c7 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (dyninst-10.2.1.tar.gz) = 5666ffd888afdb9493bd495aa6027ca5b9f71fe811a6d88777d55b612c92f73dc6c008c1738be111175a31fb0a2ec804d8ffc3e79888d8366ae5b5b624537055 -SHA512 (testsuite-10.1.0.tar.gz) = 47b91ebc0623f672378086a5f8d84e3934bd6b22d8932b12aaad257ccf7eb109505edb63dfbc3eb15aa099fc488a517835412099a77e3e0dd1275b3e3f672b3b +SHA512 (dyninst-11.0.0.tar.gz) = 30d73af656a597e4874f8b6bf0fb388e98ef591901ece9bbcaee389b9d09c44d1f3c3d323c959e6835971295eb8977d6a92c4bbb216b038126fbbc8360e9318d +SHA512 (testsuite-11.0.0.tar.gz) = bf3568e74eeb5ff7c5e8266f7843d1dd3563ab87e6275d4d586e2bbaaf965035356d869d886e527b3f000ba4213bdc035864c19f79bf648ff136d564c88a1018 diff --git a/testsuite-10.1.0-386.patch b/testsuite-10.1.0-386.patch deleted file mode 100644 index 7fbee48..0000000 --- a/testsuite-10.1.0-386.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- dyninst-10.2.0/testsuite-10.1.0/CMakeLists.txt -+++ dyninst-10.2.0/testsuite-10.1.0/CMakeLists.txt -@@ -111,7 +111,8 @@ - if(UNIX) - enable_language(ASM-ATT) -- if("${DYNINST_PLATFORM}" MATCHES "i386") -- enable_language(ASM_NASM) -- endif() -+# nasm/yasm are deprecated -+# if("${DYNINST_PLATFORM}" MATCHES "i386") -+# enable_language(ASM_NASM) -+# endif() - elseif(WIN32) - enable_language(ASM_MASM) - ---- dyninst-10.2.0/testsuite-10.1.0/src/instruction/test_instruction_farcall.C -+++ dyninst-10.2.0/testsuite-10.1.0/src/instruction/test_instruction_farcall.C -@@ -96,21 +96,21 @@ test_results_t test_instruction_farcall_Mutator::executeTest() - if(decodedInsns.size() != expectedInsns) // six valid, one invalid - { - logerror("FAILED: Expected %d instructions, decoded %d\n", expectedInsns, decodedInsns.size()); -- for(std::vector::iterator curInsn = decodedInsns.begin(); -+ for(std::vector::iterator curInsn = decodedInsns.begin(); - curInsn != decodedInsns.end(); - ++curInsn) - { -- logerror("\t%s\t", (*curInsn)->format().c_str()); -- for(unsigned j = 0; j < (*curInsn)->size(); ++j) -+ logerror("\t%s\t", (*curInsn).format().c_str()); -+ for(unsigned j = 0; j < (*curInsn).size(); ++j) - { -- logerror("%x ", (*curInsn)->rawByte(j)); -+ logerror("%x ", (*curInsn).rawByte(j)); - } - logerror("\n"); - } - - return FAILED; - } -- if(decodedInsns.back() && decodedInsns.back()->isValid()) -+ if(decodedInsns.size() > 0 && decodedInsns.back().isValid()) - { - logerror("FAILED: Expected instructions to end with an invalid instruction, but they didn't"); - return FAILED; diff --git a/testsuite-11.0.0-386.patch b/testsuite-11.0.0-386.patch new file mode 100644 index 0000000..e33a8b4 --- /dev/null +++ b/testsuite-11.0.0-386.patch @@ -0,0 +1,15 @@ +--- dyninst-11.0.0/testsuite-11.0.0/CMakeLists.txt ++++ dyninst-11.0.0/testsuite-11.0.0/CMakeLists.txt +@@ -111,7 +111,8 @@ + if(UNIX) + enable_language(ASM-ATT) +- if("${DYNINST_PLATFORM}" MATCHES "i386") +- enable_language(ASM_NASM) +- endif() ++# nasm/yasm are deprecated ++# if("${DYNINST_PLATFORM}" MATCHES "i386") ++# enable_language(ASM_NASM) ++# endif() + elseif(WIN32) + enable_language(ASM_MASM) + diff --git a/testsuite-11.0.0-test12.patch b/testsuite-11.0.0-test12.patch new file mode 100644 index 0000000..f6c999a --- /dev/null +++ b/testsuite-11.0.0-test12.patch @@ -0,0 +1,14 @@ +--- dyninst-11.0.0/testsuite-11.0.0/CMakeLists.txt ++++ dyninst-11.0.0/testsuite-11.0.0/CMakeLists.txt +@@ -341,5 +341,10 @@ + add_library(Test12 SHARED src/dyninst/libTest12.c) + add_library(dyninstAPI_RT SHARED IMPORTED) +- set_target_properties(dyninstAPI_RT PROPERTIES IMPORTED_LOCATION "${Dyninst_DIR}/../../libdyninstAPI_RT.so") ++ set(_path_suffixes dyninst) ++ find_library(dyninstAPI_RT_LIBRARY ++ NAMES libdyninstAPI_RT.so ++ PATHS ${Dyninst_DIR}/../.. ++ PATH_SUFFIXES ${_path_suffixes}) ++ set_target_properties(dyninstAPI_RT PROPERTIES IMPORTED_LOCATION ${dyninstAPI_RT_LIBRARY}) + target_link_libraries(Test12 dyninstAPI_RT) + install(TARGETS Test12 From 90c81439eaa3598dd4c8e15f9a6b2ae7f6b14a07 Mon Sep 17 00:00:00 2001 From: Stan Cox Date: Thu, 8 Jul 2021 16:50:43 -0400 Subject: [PATCH 10/55] Update to 11.0.1 --- .gitignore | 2 + dyninst-10.2.1-dbid.patch | 317 ------------------ ...-dwarf.patch => dyninst-11.0.1-dwarf.patch | 4 +- dyninst-11.0.1-rosebc.patch | 11 + dyninst-gcc11.patch | 13 - dyninst.spec | 30 +- sources | 4 +- testsuite-10.1.0-gettid.patch | 15 - testsuite-10.1.0-throw.patch | 14 - ....0-386.patch => testsuite-11.0.1-386.patch | 4 +- 10 files changed, 41 insertions(+), 373 deletions(-) delete mode 100644 dyninst-10.2.1-dbid.patch rename dyninst-11.0.0-dwarf.patch => dyninst-11.0.1-dwarf.patch (66%) create mode 100644 dyninst-11.0.1-rosebc.patch delete mode 100644 dyninst-gcc11.patch delete mode 100644 testsuite-10.1.0-gettid.patch delete mode 100644 testsuite-10.1.0-throw.patch rename testsuite-11.0.0-386.patch => testsuite-11.0.1-386.patch (75%) diff --git a/.gitignore b/.gitignore index a0f9540..cbed005 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,5 @@ /dyninst-10.2.1.tar.gz /dyninst-11.0.0.tar.gz /testsuite-11.0.0.tar.gz +/dyninst-11.0.1.tar.gz +/testsuite-11.0.1.tar.gz diff --git a/dyninst-10.2.1-dbid.patch b/dyninst-10.2.1-dbid.patch deleted file mode 100644 index 78f3997..0000000 --- a/dyninst-10.2.1-dbid.patch +++ /dev/null @@ -1,317 +0,0 @@ -Debuginfod is a lightweight web service that indexes ELF/DWARF debugging -resources by build-id and serves them over HTTP. - -This patch enables dyninst to query debuginfod servers for a file's -separate debuginfo when it otherwise cannot be found. - -This patch also adds a cmake option -DENABLE_DEBUGINFOD to control -whether dyninst is built with debuginfod support. - -This requires having the debuginfod client library (libdebuginfod) -and header installed. - -Debuginfod is distributed with elfutils, for more information see -https://sourceware.org/elfutils/Debuginfod.html ---- - cmake/ElfUtils.cmake | 37 ++++++++--- - cmake/Modules/FindLibDebuginfod.cmake | 76 +++++++++++++++++++++ - cmake/options.cmake | 2 + - elf/CMakeLists.txt | 3 + - elf/src/Elf_X.C | 95 ++++++++++++++++++++------- - 5 files changed, 178 insertions(+), 35 deletions(-) - create mode 100644 cmake/Modules/FindLibDebuginfod.cmake - ---- dyninst-10.2.1/dyninst-10.2.1/cmake/ElfUtils.cmake -+++ dyninst-10.2.1/dyninst-10.2.1/cmake/ElfUtils.cmake -@@ -28,7 +28,7 @@ - # - #====================================================================================== - --if(LibElf_FOUND AND LibDwarf_FOUND) -+if(LibElf_FOUND AND LibDwarf_FOUND AND (LibDebuginfod_FOUND OR NOT ENABLE_DEBUGINFOD)) - return() - endif() - -@@ -37,7 +37,12 @@ if(NOT UNIX) - endif() - - # Minimum acceptable version of elfutils --set(_min_version 0.178) -+if(ENABLE_DEBUGINFOD) -+ set(_min_version 0.179) -+else() -+ set(_min_version 0.178) -+endif() -+ - set(ElfUtils_MIN_VERSION ${_min_version} - CACHE STRING "Minimum acceptable elfutils version") - if(${ElfUtils_MIN_VERSION} VERSION_LESS ${_min_version}) -@@ -62,7 +67,7 @@ set(ElfUtils_LIBRARYDIR "${ElfUtils_ROOT_DIR}/lib" - CACHE PATH "Hint directory that contains the elfutils library files") - - # libelf/dwarf-specific directory hints --foreach(l LibElf LibDwarf) -+foreach(l LibElf LibDwarf LibDebuginfod) - foreach(d ROOT_DIR INCLUDEDIR LIBRARYDIR) - set(${l}_${d} ${ElfUtils_${d}}) - endforeach() -@@ -72,18 +77,30 @@ endforeach() - - find_package(LibElf ${ElfUtils_MIN_VERSION}) - --# Don't search for libdw if we didn't find a suitable libelf -+# Don't search for libdw or libdebuginfod if we didn't find a suitable libelf - if(LibElf_FOUND) - find_package(LibDwarf ${ElfUtils_MIN_VERSION}) -+ if (ENABLE_DEBUGINFOD) -+ find_package(LibDebuginfod ${ElfUtils_MIN_VERSION}) -+ endif() - endif() - - # -------------- SOURCE BUILD ------------------------------------------------- --if(LibElf_FOUND AND LibDwarf_FOUND) -- set(_eu_root ${ElfUtils_ROOT_DIR}) -- set(_eu_inc_dirs ${LibElf_INCLUDE_DIRS} ${LibDwarf_INCLUDE_DIRS}) -- set(_eu_lib_dirs ${LibElf_LIBRARY_DIRS} ${LibDwarf_LIBRARY_DIRS}) -- set(_eu_libs ${LibElf_LIBRARIES} ${LibDwarf_LIBRARIES}) -+if(LibElf_FOUND AND LibDwarf_FOUND AND (NOT ENABLE_DEBUGINFOD OR LibDebuginfod_FOUND)) -+ if(ENABLE_DEBUGINFOD AND LibDebuginfod_FOUND) -+ set(_eu_root ${ElfUtils_ROOT_DIR}) -+ set(_eu_inc_dirs ${LibElf_INCLUDE_DIRS} ${LibDwarf_INCLUDE_DIRS} ${LibDebuginfod_INCLUDE_DIRS}) -+ set(_eu_lib_dirs ${LibElf_LIBRARY_DIRS} ${LibDwarf_LIBRARY_DIRS} ${LibDebuginfod_LIBRARY_DIRS}) -+ set(_eu_libs ${LibElf_LIBRARIES} ${LibDwarf_LIBRARIES} ${LibDebuginfod_LIBRARIES}) -+ else() -+ set(_eu_root ${ElfUtils_ROOT_DIR}) -+ set(_eu_inc_dirs ${LibElf_INCLUDE_DIRS} ${LibDwarf_INCLUDE_DIRS}) -+ set(_eu_lib_dirs ${LibElf_LIBRARY_DIRS} ${LibDwarf_LIBRARY_DIRS}) -+ set(_eu_libs ${LibElf_LIBRARIES} ${LibDwarf_LIBRARIES}) -+ endif() - add_library(ElfUtils SHARED IMPORTED) -+elseif(ENABLE_DEBUGINFOD AND NOT LibDebuginfod_FOUND) -+ message(FATAL_ERROR "Debuginfod enabled but not found") - elseif(NOT (LibElf_FOUND AND LibDwarf_FOUND) AND STERILE_BUILD) - message(FATAL_ERROR "Elfutils not found and cannot be downloaded because build is sterile.") - else() - ---- /dev/null -+++ dyninst-10.2.1/dyninst-10.2.1/cmake/Modules/FindLibDebuginfod.cmake -@@ -0,0 +1,76 @@ -+#======================================================================================== -+# FindDebuginfod -+# ----------- -+# -+# Find debuginfod library and headers -+# -+# The module defines the following variables: -+# -+# This module reads hints about search locations from variables:: -+# -+# LibDebuginfod_ROOT_DIR - Base directory the of libdebuginfod installation -+# LibDebuginfod_INCLUDEDIR - Hint directory that contains the libdebuginfod headers files -+# LibDebuginfod_LIBRARYDIR - Hint directory that contains the libdebuginfod library files -+# -+# and saves search results persistently in CMake cache entries:: -+# -+# LibDebuginfod_FOUND - True if headers and requested libraries were found -+# LibDebuginfod_INCLUDE_DIRS - libdebuginfod include directories -+# LibDebuginfod_LIBRARY_DIRS - Link directories for libdebuginfod libraries -+# LibDebuginfod_LIBRARIES - libdebuginfod library files -+# -+# Utilize package config (e.g. /usr/lib64/pkgconfig/libdebuginfod.pc) to fetch -+# version information. -+# -+#======================================================================================== -+ -+find_package(PkgConfig QUIET) -+pkg_check_modules(PC_Debuginfod QUIET REQUIRED libdebuginfod>=${ElfUtils_MIN_VERSION}) -+set(LibDebuginfod_VERSION "${PC_Debuginfod_VERSION}") -+ -+find_path(LibDebuginfod_INCLUDE_DIRS -+ NAMES -+ debuginfod.h -+ HINTS -+ ${PC_Debuginfod_INCLUDEDIR} -+ ${PC_Debuginfod_INCLUDE_DIRS} -+ ${LibDebuginfod_ROOT_DIR}/include -+ ${LibDebuginfod_ROOT_DIR} -+ ${LibDebuginfod_INCLUDEDIR} -+ PATHS -+ ${DYNINST_SYSTEM_INCLUDE_PATHS} -+ PATH_SUFFIXES -+ ${_path_suffixes} -+ DOC -+ "libdebuginfod include directories") -+ -+find_library(LibDebuginfod_LIBRARIES -+ NAMES -+ libdebuginfod.so.1 libdebuginfod.so -+ HINTS -+ ${PC_Debuginfod_LIBDIR} -+ ${PC_Debuginfod_LIBRARY_DIRS} -+ ${LibDebuginfod_ROOT_DIR}/lib -+ ${LibDebuginfod_ROOT_DIR} -+ ${LibDebuginfod_LIBRARYDIR} -+ PATHS -+ ${DYNINST_SYSTEM_LIBRARY_PATHS} -+ PATH_SUFFIXES -+ ${_path_suffixes}) -+ -+include(FindPackageHandleStandardArgs) -+find_package_handle_standard_args(LibDebuginfod -+ FOUND_VAR -+ LibDebuginfod_FOUND -+ REQUIRED_VARS -+ LibDebuginfod_INCLUDE_DIRS -+ LibDebuginfod_LIBRARIES -+ VERSION_VAR -+ LibDebuginfod_VERSION) -+ -+if(LibDebuginfod_FOUND) -+ set(LibDebuginfod_INCLUDE_DIRS ${LibDebuginfod_INCLUDE_DIRS}) -+ set(LibDebuginfod_LIBRARIES ${LibDebuginfod_LIBRARIES}) -+ get_filename_component(_debuginfod_dir ${LibDebuginfod_LIBRARIES} DIRECTORY) -+ set(LibDebuginfod_LIBRARY_DIRS ${_debuginfod_dir} "${_debuginfod_dir}/elfutils") -+endif() - ---- dyninst-10.2.1/dyninst-10.2.1/cmake/options.cmake -+++ dyninst-10.2.1/dyninst-10.2.1/cmake/options.cmake -@@ -16,6 +16,8 @@ option(USE_COTIRE "Enable Cotire precompiled headers") - - option (ENABLE_LTO "Enable Link-Time Optimization" OFF) - -+option(ENABLE_DEBUGINFOD "Enable debuginfod support" OFF) -+ - # Some global on/off switches - if (LIGHTWEIGHT_SYMTAB) - add_definitions (-DWITHOUT_SYMTAB_API -DWITH_SYMLITE) - ---- dyninst-10.2.1/dyninst-10.2.1/elf/CMakeLists.txt -+++ dyninst-10.2.1/dyninst-10.2.1/elf/CMakeLists.txt -@@ -27,5 +27,8 @@ endif() - add_dependencies(dynElf ElfUtils) - target_link_private_libraries(dynElf ${ElfUtils_LIBRARIES}) - -+if (ENABLE_DEBUGINFOD AND LibDebuginfod_FOUND) -+ add_definitions(-DDEBUGINFOD_LIB) -+endif() - - add_definitions(-DDYNELF_LIB) - - ---- dyninst-10.2.1/dyninst-10.2.1/elf/src/Elf_X.C -+++ dyninst-10.2.1/dyninst-10.2.1/elf/src/Elf_X.C -@@ -47,6 +47,9 @@ - #include - #include - -+#if DEBUGINFOD_LIB -+#include -+#endif - - using namespace std; - using boost::crc_32_type; -@@ -1722,37 +1725,79 @@ bool Elf_X::findDebugFile(std::string origfilename, string &output_name, char* & - } - } - -- if (debugFileFromDebugLink.empty()) -- return false; -+ if (!debugFileFromDebugLink.empty()) { -+ char *mfPathNameCopy = strdup(origfilename.c_str()); -+ string objectFileDirName = dirname(mfPathNameCopy); - -- char *mfPathNameCopy = strdup(origfilename.c_str()); -- string objectFileDirName = dirname(mfPathNameCopy); -+ vector fnames = list_of -+ (objectFileDirName + "/" + debugFileFromDebugLink) -+ (objectFileDirName + "/.debug/" + debugFileFromDebugLink) -+ ("/usr/lib/debug/" + objectFileDirName + "/" + debugFileFromDebugLink); - -- vector fnames = list_of -- (objectFileDirName + "/" + debugFileFromDebugLink) -- (objectFileDirName + "/.debug/" + debugFileFromDebugLink) -- ("/usr/lib/debug/" + objectFileDirName + "/" + debugFileFromDebugLink); -+ free(mfPathNameCopy); - -- free(mfPathNameCopy); -+ for(unsigned i = 0; i < fnames.size(); i++) { -+ bool result = loadDebugFileFromDisk(fnames[i], output_buffer, output_buffer_size); -+ if (!result) -+ continue; - -- for(unsigned i = 0; i < fnames.size(); i++) { -- bool result = loadDebugFileFromDisk(fnames[i], output_buffer, output_buffer_size); -- if (!result) -- continue; -- -- boost::crc_32_type crcComputer; -- crcComputer.process_bytes(output_buffer, output_buffer_size); -- if(crcComputer.checksum() != debugFileCrc) { -- munmap(output_buffer, output_buffer_size); -- continue; -- } -+ boost::crc_32_type crcComputer; -+ crcComputer.process_bytes(output_buffer, output_buffer_size); -+ if(crcComputer.checksum() != debugFileCrc) { -+ munmap(output_buffer, output_buffer_size); -+ continue; -+ } -+ -+ output_name = fnames[i]; -+ cached_debug_buffer = output_buffer; -+ cached_debug_size = output_buffer_size; -+ cached_debug_name = output_name; -+ return true; -+ } -+ } - -- output_name = fnames[i]; -- cached_debug_buffer = output_buffer; -- cached_debug_size = output_buffer_size; -- cached_debug_name = output_name; -- return true; -+#ifdef DEBUGINFOD_LIB -+ if (!debugFileFromBuildID.empty()) { -+ // Given /usr/lib/debug/.buildid/XX/YYYYYY.debug, isolate XXYYYYYY. -+ size_t idx1 = debugFileFromBuildID.find_last_of("/"); -+ size_t idx2 = debugFileFromBuildID.find_last_of("."); -+ -+ if (idx1 == string::npos || idx2 == string::npos -+ || idx1 < 2 || idx1 > idx2) -+ return false; -+ -+ idx1 -= 2; -+ string buildid(debugFileFromBuildID.substr(idx1, idx2 - idx1)); -+ buildid.erase(2, 1); -+ -+ debuginfod_client *client = debuginfod_begin(); -+ if (client == NULL) -+ return false; -+ -+ char *filename; -+ int fd = debuginfod_find_debuginfo(client, -+ (const unsigned char *)buildid.c_str(), -+ 0, &filename); -+ debuginfod_end(client); -+ -+ if (fd >= 0) { -+ string fname = string(filename); -+ free(filename); -+ close(fd); -+ -+ bool result = loadDebugFileFromDisk(fname, -+ output_buffer, -+ output_buffer_size); -+ if (result) { -+ output_name = fname; -+ cached_debug_buffer = output_buffer; -+ cached_debug_size = output_buffer_size; -+ cached_debug_name = output_name; -+ return true; -+ } -+ } - } -+#endif - - return false; - } diff --git a/dyninst-11.0.0-dwarf.patch b/dyninst-11.0.1-dwarf.patch similarity index 66% rename from dyninst-11.0.0-dwarf.patch rename to dyninst-11.0.1-dwarf.patch index 6172a9c..f4b5f70 100644 --- a/dyninst-11.0.0-dwarf.patch +++ b/dyninst-11.0.1-dwarf.patch @@ -3,8 +3,8 @@ Remove extraneous error messages of the form: err message: invalid DWARF which are repeated in some circumstances without adding useful context ---- dyninst-11.0.0/dyninst-11.0.0/symtabAPI/src/dwarfWalker.C.orig 2021-04-08 16:48:12.000000000 -0400 -+++ dyninst-11.0.0/dyninst-11.0.0/symtabAPI/src/dwarfWalker.C 2021-04-27 12:48:55.643978425 -0400 +--- dyninst-11.0.1/symtabAPI/src/dwarfWalker.C.orig 2021-04-08 16:48:12.000000000 -0400 ++++ dyninst-11.0.1/symtabAPI/src/dwarfWalker.C 2021-04-27 12:48:55.643978425 -0400 @@ -1858,1 +1858,1 @@ - cerr << "err message: " << dwarf_errmsg(dwarf_errno()) << endl; + dwarf_printf("(0x%lx) Error while decoding location: %s\n", id(), dwarf_errmsg(dwarf_errno())); diff --git a/dyninst-11.0.1-rosebc.patch b/dyninst-11.0.1-rosebc.patch new file mode 100644 index 0000000..989f4e7 --- /dev/null +++ b/dyninst-11.0.1-rosebc.patch @@ -0,0 +1,11 @@ +rhbz1973038 + +--- dyninst-11.0.1/dataflowAPI/src/RoseInsnFactory.C.orig 2021-06-09 15:54:21.753883619 -0400 ++++ dyninst-11.0.1/dataflowAPI/src/RoseInsnFactory.C 2021-06-23 14:17:37.854933719 -0400 +@@ -317,5 +317,5 @@ + // It looks like the ROSE semantics code will infer the target from + // the bo field. So, what is passed in as the third operands does not matter +- if(branch_target) { ++ if(branch_target || iapi_opcode == power_op_bc) { + rose_operands->append_operand(new SgAsmDoubleWordValueExpression(branch_target)); + } else if(power_op_bcctr == iapi_opcode) { diff --git a/dyninst-gcc11.patch b/dyninst-gcc11.patch deleted file mode 100644 index 8fc536c..0000000 --- a/dyninst-gcc11.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/testsuite-10.1.0/src/dyninst/test1_3.C b/testsuite-10.1.0/src/dyninst/test1_3.C -index d32f630..b9bd0ba 100644 ---- a/testsuite-10.1.0/src/dyninst/test1_3.C -+++ b/testsuite-10.1.0/src/dyninst/test1_3.C -@@ -134,7 +134,7 @@ test_results_t test1_3_Mutator::executeTest() - } - - // see if we can find the address -- if (expr3_1->getBaseAddr() <= 0) -+ if (expr3_1->getBaseAddr() == 0) - { - logerror("*Error*: address %p for %s is not valid\n", - expr3_1->getBaseAddr(), globalVar); diff --git a/dyninst.spec b/dyninst.spec index 1f2e332..cff7834 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -1,17 +1,18 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst +Group: Development/Libraries Release: 1%{?dist} URL: http://www.dyninst.org -Version: 11.0.0 +Version: 11.0.1 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 Source0: https://github.com/dyninst/dyninst/archive/v%{version}/dyninst-%{version}.tar.gz Source1: https://github.com/dyninst/testsuite/archive/%{version}/testsuite-%{version}.tar.gz -Patch1: testsuite-11.0.0-test12.patch -Patch2: testsuite-11.0.0-386.patch -Patch3: dyninst-11.0.0-dwarf.patch +Patch1: dyninst-11.0.1-dwarf.patch +Patch2: dyninst-11.0.1-rosebc.patch +Patch3: testsuite-11.0.1-386.patch %global dyninst_base dyninst-%{version} %global testsuite_base testsuite-%{version} @@ -20,7 +21,7 @@ BuildRequires: gcc-c++ BuildRequires: elfutils-devel BuildRequires: elfutils-libelf-devel BuildRequires: elfutils-debuginfod-client-devel -BuildRequires: boost-devel >= 1.75 +BuildRequires: boost-devel BuildRequires: binutils-devel BuildRequires: cmake BuildRequires: libtirpc-devel @@ -50,11 +51,13 @@ the creation of tools and applications that use run-time code patching. %package doc Summary: Documentation for using the Dyninst API +Group: Documentation %description doc dyninst-doc contains API documentation for the Dyninst libraries. %package devel Summary: Header files for compiling programs with Dyninst +Group: Development/System Requires: dyninst = %{version}-%{release} Requires: boost-devel Requires: tbb-devel @@ -66,6 +69,7 @@ that uses Dyninst. %package testsuite Summary: Programs for testing Dyninst +Group: Development/System Requires: dyninst = %{version}-%{release} Requires: dyninst-devel = %{version}-%{release} %description testsuite @@ -76,9 +80,14 @@ making sure that dyninst works properly. %setup -q -n %{name}-%{version} -c %setup -q -T -D -a 1 -%patch1 -p1 -b .test12 -%patch2 -p1 -b .386 +pushd %{dyninst_base} +%patch1 -p1 -b .386 +%patch2 -p1 -b .rose +popd + +pushd %{testsuite_base} %patch3 -p1 -b .dwarf +popd # cotire seems to cause non-deterministic gcc errors # https://bugzilla.redhat.com/show_bug.cgi?id=1420551 @@ -104,7 +113,8 @@ export CFLAGS CXXFLAGS LDFLAGS -DINSTALL_INCLUDE_DIR:PATH=%{_includedir}/dyninst \ -DINSTALL_CMAKE_DIR:PATH=%{_libdir}/cmake/Dyninst \ -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_SKIP_RPATH:BOOL=YES + -DCMAKE_SKIP_RPATH:BOOL=YES \ + . %cmake_build # Hack to install dyninst nearby, so the testsuite can use it @@ -120,6 +130,7 @@ cd ../%{testsuite_base} -DINSTALL_DIR:PATH=%{_libdir}/dyninst/testsuite \ -DCMAKE_BUILD_TYPE:STRING=Debug \ -DCMAKE_SKIP_RPATH:BOOL=YES \ + . %cmake_build %install @@ -182,6 +193,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Thu Jul 08 2021 Stan Cox - 11.0.1 +- Update to 11.0.1 + * Fri Apr 30 2021 Stan Cox - 11.0.0 - Update to 11.0.0 diff --git a/sources b/sources index aef75c7..a8d66c9 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (dyninst-11.0.0.tar.gz) = 30d73af656a597e4874f8b6bf0fb388e98ef591901ece9bbcaee389b9d09c44d1f3c3d323c959e6835971295eb8977d6a92c4bbb216b038126fbbc8360e9318d -SHA512 (testsuite-11.0.0.tar.gz) = bf3568e74eeb5ff7c5e8266f7843d1dd3563ab87e6275d4d586e2bbaaf965035356d869d886e527b3f000ba4213bdc035864c19f79bf648ff136d564c88a1018 +SHA512 (dyninst-11.0.1.tar.gz) = 9c439be0252edae0ed3fcfa05b38595b614a91b6627afa85db126df32d5c5de5dc9413a70caf52bee7ac2349d24947626f6370f0dbf19413916c39e01679444f +SHA512 (testsuite-11.0.1.tar.gz) = 3c671adb9fd7e1b7cc6374c45b3fe2325b725f9a2add300ae46d95f3169b75719fb912c536a609631ca3eaf1c632e3d32b93a3d8e5ae26f03f0611bc9226723a diff --git a/testsuite-10.1.0-gettid.patch b/testsuite-10.1.0-gettid.patch deleted file mode 100644 index 9b75b25..0000000 --- a/testsuite-10.1.0-gettid.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- dyninst-10.1.0/testsuite-10.1.0/src/proccontrol/pcontrol_mutatee_tools.c.orig 2019-05-31 05:20:00.492379706 +0200 -+++ dyninst-10.1.0/testsuite-10.1.0/src/proccontrol/pcontrol_mutatee_tools.c 2019-05-31 05:10:11.354826668 +0200 -@@ -62,9 +62,9 @@ - #if !defined(os_windows_test) - #include - --static unsigned int gettid(){ -- return (unsigned int)pthread_self(); --} -+// static unsigned int gettid(){ -+// return (unsigned int)pthread_self(); -+// } - #endif - - thread_t threads[MAX_POSSIBLE_THREADS]; diff --git a/testsuite-10.1.0-throw.patch b/testsuite-10.1.0-throw.patch deleted file mode 100644 index 886e9b5..0000000 --- a/testsuite-10.1.0-throw.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- dyninst-10.2.0/testsuite-10.1.0/src/test_lib.h -+++ dyninst-10.2.0/testsuite-10.1.0/src/test_lib.h -@@ -158,3 +158,3 @@ - -- TESTLIB_DLL_EXPORT virtual ~LocErr() THROW; -+ TESTLIB_DLL_EXPORT virtual ~LocErr() throw(); - ---- dyninst-10.2.0/testsuite-10.1.0/src/test_lib.C -+++ dyninst-10.2.0/testsuite-10.1.0/src/test_lib.C -@@ -112,3 +112,3 @@ - --LocErr::~LocErr() THROW -+LocErr::~LocErr() throw() - {} diff --git a/testsuite-11.0.0-386.patch b/testsuite-11.0.1-386.patch similarity index 75% rename from testsuite-11.0.0-386.patch rename to testsuite-11.0.1-386.patch index e33a8b4..1a2467f 100644 --- a/testsuite-11.0.0-386.patch +++ b/testsuite-11.0.1-386.patch @@ -1,5 +1,5 @@ ---- dyninst-11.0.0/testsuite-11.0.0/CMakeLists.txt -+++ dyninst-11.0.0/testsuite-11.0.0/CMakeLists.txt +--- testsuite-11.0.1/CMakeLists.txt ++++ testsuite-11.0.1/CMakeLists.txt @@ -111,7 +111,8 @@ if(UNIX) enable_language(ASM-ATT) From 489f2de661b5df8b02ddef631bbfe4ca49b08206 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 21 Jul 2021 21:32:23 +0000 Subject: [PATCH 11/55] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- dyninst.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dyninst.spec b/dyninst.spec index cff7834..b5a960c 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst Group: Development/Libraries -Release: 1%{?dist} +Release: 2%{?dist} URL: http://www.dyninst.org Version: 11.0.1 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 @@ -193,6 +193,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Wed Jul 21 2021 Fedora Release Engineering - 11.0.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Thu Jul 08 2021 Stan Cox - 11.0.1 - Update to 11.0.1 From ce2957123d87182790194460d48db6fed349d3d7 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Fri, 6 Aug 2021 23:08:02 +0100 Subject: [PATCH 12/55] Rebuilt for Boost 1.76 --- dyninst.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dyninst.spec b/dyninst.spec index b5a960c..2ef44c4 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst Group: Development/Libraries -Release: 2%{?dist} +Release: 3%{?dist} URL: http://www.dyninst.org Version: 11.0.1 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 @@ -193,6 +193,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Fri Aug 06 2021 Jonathan Wakely - 11.0.1-3 +- Rebuilt for Boost 1.76 + * Wed Jul 21 2021 Fedora Release Engineering - 11.0.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From a10ca5be639e5e6afe997f9af118b3cdf663986f Mon Sep 17 00:00:00 2001 From: Stan Cox Date: Tue, 9 Nov 2021 10:44:20 -0500 Subject: [PATCH 13/55] Do not create relocs for aarch64 static calls --- dyninst-11.0.1-aarch64.patch | 63 +++++++++++++++++++++++++++++++++++ dyninst.spec | 11 ++++-- testsuite-11.0.0-test12.patch | 14 -------- 3 files changed, 71 insertions(+), 17 deletions(-) create mode 100644 dyninst-11.0.1-aarch64.patch delete mode 100644 testsuite-11.0.0-test12.patch diff --git a/dyninst-11.0.1-aarch64.patch b/dyninst-11.0.1-aarch64.patch new file mode 100644 index 0000000..7e88331 --- /dev/null +++ b/dyninst-11.0.1-aarch64.patch @@ -0,0 +1,63 @@ +commit 874a73ea4 (HEAD -> master, upstream/master) +Author: Stan Cox +Date: Mon Nov 1 14:24:07 2021 -0400 + + Don't overflow aarch64 float register vector when setting used regs. (#1127) + + Do not include the subtype when setting a float register as a used register if the registerSlot vector would be exceeded, e.g. for a value like 0x400 (Q_REG/register 0). + +--- dyninst-11.0.1/dyninstAPI/src/inst-aarch64.C.orig ++++ dyninst-11.0.1/dyninstAPI/src/inst-aarch64.C +@@ -551,8 +551,13 @@ bool EmitterAARCH64::clobberAllFuncCall(registerSpace *rs, + rs->GPRs()[*itr]->beenUsed = true; + + std::set *fpRegs = callee->ifunc()->usedFPRs(); +- for(std::set::iterator itr = fpRegs->begin(); itr != fpRegs->end(); itr++) +- rs->FPRs()[*itr]->beenUsed = true; ++ for(std::set::iterator itr = fpRegs->begin(); itr != fpRegs->end(); itr++) { ++ if (*itr <= rs->FPRs().size()) ++ rs->FPRs()[*itr]->beenUsed = true; ++ else ++ // parse_func::calcUsedRegs includes the subtype; we only want the regno ++ rs->FPRs()[*itr & 0xff]->beenUsed = true; ++ } + } else { + for(int idx = 0; idx < rs->numGPRs(); idx++) + rs->GPRs()[idx]->beenUsed = true; +commit b2c892f55 +Author: Stan Cox +Date: Tue Oct 26 17:43:14 2021 -0400 + + Load callee's address when the callee and caller are in the same module (#1056) + + If the callee and caller are in the same module and pic is not + required then the callee's address can be loaded directly without + using a relocation. + +--- dyninst-11.0.0/dyninstAPI/src/inst-aarch64.C.orig ++++ dyninst-11.0.0/dyninstAPI/src/inst-aarch64.C +@@ -651,12 +651,14 @@ Register EmitterAARCH64::emitCall(opCode op, + + assert(gen.rs()); + +- //Address of function to call in scratch register ++ // Address of function to call in scratch register + Register scratch = gen.rs()->getScratchRegister(gen); + assert(scratch != REG_NULL && "cannot get a scratch register"); + gen.markRegDefined(scratch); + +- if (gen.addrSpace()->edit() != NULL) { ++ if (gen.addrSpace()->edit() != NULL ++ && (gen.func()->obj() != callee->obj() ++ || gen.addrSpace()->needsPIC())) { + // gen.as.edit() checks if we are in rewriter mode + Address dest = getInterModuleFuncAddr(callee, gen); + +@@ -666,7 +668,6 @@ Register EmitterAARCH64::emitCall(opCode op, + instruction insn; + insn.clear(); + INSN_SET(insn, 31, 31, 0); +- //INSN_SET(insn, 29, 30, disp & 0x3); + INSN_SET(insn, 28, 28, 1); + INSN_SET(insn, 5, 23, disp >> 2); + INSN_SET(insn, 0, 4, scratch); diff --git a/dyninst.spec b/dyninst.spec index 2ef44c4..22a93f4 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst Group: Development/Libraries -Release: 3%{?dist} +Release: 4%{?dist} URL: http://www.dyninst.org Version: 11.0.1 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 @@ -12,7 +12,8 @@ Source1: https://github.com/dyninst/testsuite/archive/%{version}/testsuite-%{ver Patch1: dyninst-11.0.1-dwarf.patch Patch2: dyninst-11.0.1-rosebc.patch -Patch3: testsuite-11.0.1-386.patch +Patch3: dyninst-11.0.1-aarch64.patch +Patch4: testsuite-11.0.1-386.patch %global dyninst_base dyninst-%{version} %global testsuite_base testsuite-%{version} @@ -83,10 +84,11 @@ making sure that dyninst works properly. pushd %{dyninst_base} %patch1 -p1 -b .386 %patch2 -p1 -b .rose +%patch3 -p1 -b .aarch64 popd pushd %{testsuite_base} -%patch3 -p1 -b .dwarf +%patch4 -p1 -b .dwarf popd # cotire seems to cause non-deterministic gcc errors @@ -193,6 +195,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Tue Nov 09 2021 Stan Cox - 11.0.1-4 +- Do not create reloc for aarch64 static calls + * Fri Aug 06 2021 Jonathan Wakely - 11.0.1-3 - Rebuilt for Boost 1.76 diff --git a/testsuite-11.0.0-test12.patch b/testsuite-11.0.0-test12.patch deleted file mode 100644 index f6c999a..0000000 --- a/testsuite-11.0.0-test12.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- dyninst-11.0.0/testsuite-11.0.0/CMakeLists.txt -+++ dyninst-11.0.0/testsuite-11.0.0/CMakeLists.txt -@@ -341,5 +341,10 @@ - add_library(Test12 SHARED src/dyninst/libTest12.c) - add_library(dyninstAPI_RT SHARED IMPORTED) -- set_target_properties(dyninstAPI_RT PROPERTIES IMPORTED_LOCATION "${Dyninst_DIR}/../../libdyninstAPI_RT.so") -+ set(_path_suffixes dyninst) -+ find_library(dyninstAPI_RT_LIBRARY -+ NAMES libdyninstAPI_RT.so -+ PATHS ${Dyninst_DIR}/../.. -+ PATH_SUFFIXES ${_path_suffixes}) -+ set_target_properties(dyninstAPI_RT PROPERTIES IMPORTED_LOCATION ${dyninstAPI_RT_LIBRARY}) - target_link_libraries(Test12 dyninstAPI_RT) - install(TARGETS Test12 From 52366e33642fcf61439bbe728143b3e4965163e4 Mon Sep 17 00:00:00 2001 From: Stan Cox Date: Wed, 10 Nov 2021 10:15:35 -0500 Subject: [PATCH 14/55] Build dyninst-testsuite with -j1 --- dyninst.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dyninst.spec b/dyninst.spec index 22a93f4..24a3c0d 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -127,6 +127,8 @@ find ../install -name '*.cmake' -execdir \ sed -i '/libtbb.so/ s/".*usr/"\/usr/' $PWD/../install%{_libdir}/cmake/Dyninst/commonTargets.cmake cd ../%{testsuite_base} +# testsuite build sometimes encounters dependency issues with -jN +%define _smp_mflags -j1 %cmake \ -DDyninst_DIR:PATH=$PWD/../install%{_libdir}/cmake/Dyninst \ -DINSTALL_DIR:PATH=%{_libdir}/dyninst/testsuite \ From 43c3301e82574ca0b42be6961ffb5b260cfe49af Mon Sep 17 00:00:00 2001 From: Stan Cox Date: Mon, 10 Jan 2022 14:15:28 -0500 Subject: [PATCH 15/55] Update to 12.0.1 --- .gitignore | 2 ++ dyninst-11.0.1-aarch64.patch | 63 ------------------------------------ dyninst-11.0.1-dwarf.patch | 11 ------- dyninst-11.0.1-rosebc.patch | 11 ------- dyninst.spec | 22 ++++++------- rhbz2034662.patch | 15 +++++++++ sources | 4 +-- testsuite-11.0.1-386.patch | 15 --------- 8 files changed, 29 insertions(+), 114 deletions(-) delete mode 100644 dyninst-11.0.1-aarch64.patch delete mode 100644 dyninst-11.0.1-dwarf.patch delete mode 100644 dyninst-11.0.1-rosebc.patch create mode 100644 rhbz2034662.patch delete mode 100644 testsuite-11.0.1-386.patch diff --git a/.gitignore b/.gitignore index cbed005..b5ef857 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,5 @@ /testsuite-11.0.0.tar.gz /dyninst-11.0.1.tar.gz /testsuite-11.0.1.tar.gz +/dyninst-12.0.1.tar.gz +/testsuite-12.0.0.tar.gz diff --git a/dyninst-11.0.1-aarch64.patch b/dyninst-11.0.1-aarch64.patch deleted file mode 100644 index 7e88331..0000000 --- a/dyninst-11.0.1-aarch64.patch +++ /dev/null @@ -1,63 +0,0 @@ -commit 874a73ea4 (HEAD -> master, upstream/master) -Author: Stan Cox -Date: Mon Nov 1 14:24:07 2021 -0400 - - Don't overflow aarch64 float register vector when setting used regs. (#1127) - - Do not include the subtype when setting a float register as a used register if the registerSlot vector would be exceeded, e.g. for a value like 0x400 (Q_REG/register 0). - ---- dyninst-11.0.1/dyninstAPI/src/inst-aarch64.C.orig -+++ dyninst-11.0.1/dyninstAPI/src/inst-aarch64.C -@@ -551,8 +551,13 @@ bool EmitterAARCH64::clobberAllFuncCall(registerSpace *rs, - rs->GPRs()[*itr]->beenUsed = true; - - std::set *fpRegs = callee->ifunc()->usedFPRs(); -- for(std::set::iterator itr = fpRegs->begin(); itr != fpRegs->end(); itr++) -- rs->FPRs()[*itr]->beenUsed = true; -+ for(std::set::iterator itr = fpRegs->begin(); itr != fpRegs->end(); itr++) { -+ if (*itr <= rs->FPRs().size()) -+ rs->FPRs()[*itr]->beenUsed = true; -+ else -+ // parse_func::calcUsedRegs includes the subtype; we only want the regno -+ rs->FPRs()[*itr & 0xff]->beenUsed = true; -+ } - } else { - for(int idx = 0; idx < rs->numGPRs(); idx++) - rs->GPRs()[idx]->beenUsed = true; -commit b2c892f55 -Author: Stan Cox -Date: Tue Oct 26 17:43:14 2021 -0400 - - Load callee's address when the callee and caller are in the same module (#1056) - - If the callee and caller are in the same module and pic is not - required then the callee's address can be loaded directly without - using a relocation. - ---- dyninst-11.0.0/dyninstAPI/src/inst-aarch64.C.orig -+++ dyninst-11.0.0/dyninstAPI/src/inst-aarch64.C -@@ -651,12 +651,14 @@ Register EmitterAARCH64::emitCall(opCode op, - - assert(gen.rs()); - -- //Address of function to call in scratch register -+ // Address of function to call in scratch register - Register scratch = gen.rs()->getScratchRegister(gen); - assert(scratch != REG_NULL && "cannot get a scratch register"); - gen.markRegDefined(scratch); - -- if (gen.addrSpace()->edit() != NULL) { -+ if (gen.addrSpace()->edit() != NULL -+ && (gen.func()->obj() != callee->obj() -+ || gen.addrSpace()->needsPIC())) { - // gen.as.edit() checks if we are in rewriter mode - Address dest = getInterModuleFuncAddr(callee, gen); - -@@ -666,7 +668,6 @@ Register EmitterAARCH64::emitCall(opCode op, - instruction insn; - insn.clear(); - INSN_SET(insn, 31, 31, 0); -- //INSN_SET(insn, 29, 30, disp & 0x3); - INSN_SET(insn, 28, 28, 1); - INSN_SET(insn, 5, 23, disp >> 2); - INSN_SET(insn, 0, 4, scratch); diff --git a/dyninst-11.0.1-dwarf.patch b/dyninst-11.0.1-dwarf.patch deleted file mode 100644 index f4b5f70..0000000 --- a/dyninst-11.0.1-dwarf.patch +++ /dev/null @@ -1,11 +0,0 @@ -Remove extraneous error messages of the form: - err message: .debug_loclists section missing - err message: invalid DWARF -which are repeated in some circumstances without adding useful context - ---- dyninst-11.0.1/symtabAPI/src/dwarfWalker.C.orig 2021-04-08 16:48:12.000000000 -0400 -+++ dyninst-11.0.1/symtabAPI/src/dwarfWalker.C 2021-04-27 12:48:55.643978425 -0400 -@@ -1858,1 +1858,1 @@ -- cerr << "err message: " << dwarf_errmsg(dwarf_errno()) << endl; -+ dwarf_printf("(0x%lx) Error while decoding location: %s\n", id(), dwarf_errmsg(dwarf_errno())); - diff --git a/dyninst-11.0.1-rosebc.patch b/dyninst-11.0.1-rosebc.patch deleted file mode 100644 index 989f4e7..0000000 --- a/dyninst-11.0.1-rosebc.patch +++ /dev/null @@ -1,11 +0,0 @@ -rhbz1973038 - ---- dyninst-11.0.1/dataflowAPI/src/RoseInsnFactory.C.orig 2021-06-09 15:54:21.753883619 -0400 -+++ dyninst-11.0.1/dataflowAPI/src/RoseInsnFactory.C 2021-06-23 14:17:37.854933719 -0400 -@@ -317,5 +317,5 @@ - // It looks like the ROSE semantics code will infer the target from - // the bo field. So, what is passed in as the third operands does not matter -- if(branch_target) { -+ if(branch_target || iapi_opcode == power_op_bc) { - rose_operands->append_operand(new SgAsmDoubleWordValueExpression(branch_target)); - } else if(power_op_bcctr == iapi_opcode) { diff --git a/dyninst.spec b/dyninst.spec index 24a3c0d..109acd4 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,21 +2,19 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst Group: Development/Libraries -Release: 4%{?dist} +Release: 1%{?dist} URL: http://www.dyninst.org -Version: 11.0.1 +Version: 12.0.1 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 +%define __testsuite_version 12.0.0 Source0: https://github.com/dyninst/dyninst/archive/v%{version}/dyninst-%{version}.tar.gz -Source1: https://github.com/dyninst/testsuite/archive/%{version}/testsuite-%{version}.tar.gz +Source1: https://github.com/dyninst/testsuite/archive/%{__testsuite_version}/testsuite-%{__testsuite_version}.tar.gz -Patch1: dyninst-11.0.1-dwarf.patch -Patch2: dyninst-11.0.1-rosebc.patch -Patch3: dyninst-11.0.1-aarch64.patch -Patch4: testsuite-11.0.1-386.patch +Patch1: rhbz2034662.patch %global dyninst_base dyninst-%{version} -%global testsuite_base testsuite-%{version} +%global testsuite_base testsuite-%{__testsuite_version} BuildRequires: gcc-c++ BuildRequires: elfutils-devel @@ -82,13 +80,10 @@ making sure that dyninst works properly. %setup -q -T -D -a 1 pushd %{dyninst_base} -%patch1 -p1 -b .386 -%patch2 -p1 -b .rose -%patch3 -p1 -b .aarch64 +%patch1 -p1 -b .2034662 popd pushd %{testsuite_base} -%patch4 -p1 -b .dwarf popd # cotire seems to cause non-deterministic gcc errors @@ -197,6 +192,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Mon Jan 10 2022 Stan Cox - 12.0.1-1 +- Update to 12.0.1 + * Tue Nov 09 2021 Stan Cox - 11.0.1-4 - Do not create reloc for aarch64 static calls diff --git a/rhbz2034662.patch b/rhbz2034662.patch new file mode 100644 index 0000000..7e9d6b5 --- /dev/null +++ b/rhbz2034662.patch @@ -0,0 +1,15 @@ +Remove interposed definition of _r_debug + +Previously there was a dynamic relocation against _r_debug in the loader which picked up the interposed definition, +but glibc now uses a direct internal hidden symbol reference and thus no longer updates the interposed object. + +--- dyninst-12.0.0/dyninstAPI_RT/src/RTlinux.c ++++ dyninst-12.0.0/dyninstAPI_RT/src/RTlinux.c +@@ -404,7 +404,6 @@ void dyninstTrapHandler(int sig, siginfo_t *sg, ucontext_t *context) + #if defined(cap_binary_rewriter) + + extern struct r_debug _r_debug; +-DLLEXPORT struct r_debug _r_debug __attribute__ ((weak)); + + /* Verify that the r_debug variable is visible */ + void r_debugCheck() { assert(_r_debug.r_map); } diff --git a/sources b/sources index a8d66c9..33751cd 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (dyninst-11.0.1.tar.gz) = 9c439be0252edae0ed3fcfa05b38595b614a91b6627afa85db126df32d5c5de5dc9413a70caf52bee7ac2349d24947626f6370f0dbf19413916c39e01679444f -SHA512 (testsuite-11.0.1.tar.gz) = 3c671adb9fd7e1b7cc6374c45b3fe2325b725f9a2add300ae46d95f3169b75719fb912c536a609631ca3eaf1c632e3d32b93a3d8e5ae26f03f0611bc9226723a +SHA512 (dyninst-12.0.1.tar.gz) = 7827d4fa84ed15773e191b36612a3eab4e4b5451b1c645d0899056b831d7fdaa5b2ee439287ef0755d68f7d3a7882139f7d79b4a318700a676c3f0fc687482ad +SHA512 (testsuite-12.0.0.tar.gz) = 7e39b0e1f1a7687abebcf44c59124855d4128ce8820b6a31efa987441c1d94b19a315b208a7ef56c57e5ca91e12d5388f2cd8298791500a98ffa4d3790507f27 diff --git a/testsuite-11.0.1-386.patch b/testsuite-11.0.1-386.patch deleted file mode 100644 index 1a2467f..0000000 --- a/testsuite-11.0.1-386.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- testsuite-11.0.1/CMakeLists.txt -+++ testsuite-11.0.1/CMakeLists.txt -@@ -111,7 +111,8 @@ - if(UNIX) - enable_language(ASM-ATT) -- if("${DYNINST_PLATFORM}" MATCHES "i386") -- enable_language(ASM_NASM) -- endif() -+# nasm/yasm are deprecated -+# if("${DYNINST_PLATFORM}" MATCHES "i386") -+# enable_language(ASM_NASM) -+# endif() - elseif(WIN32) - enable_language(ASM_MASM) - From 7d4fab42a8b053104550da90f54122d04a421d61 Mon Sep 17 00:00:00 2001 From: Martin Cermak Date: Wed, 19 Jan 2022 13:17:19 +0100 Subject: [PATCH 16/55] CI Gating: Use upstream testsuite as a gating test --- tests/Sanity/testsuite/main.fmf | 19 +++++++++ tests/Sanity/testsuite/runtest.sh | 69 +++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 tests/Sanity/testsuite/main.fmf create mode 100755 tests/Sanity/testsuite/runtest.sh diff --git a/tests/Sanity/testsuite/main.fmf b/tests/Sanity/testsuite/main.fmf new file mode 100644 index 0000000..63be86c --- /dev/null +++ b/tests/Sanity/testsuite/main.fmf @@ -0,0 +1,19 @@ +summary: Dyninst upstream testsuite wrapper +description: '' +contact: Martin Cermak +component: +- dyninst +test: ./runtest.sh +framework: beakerlib +recommend: +- dyninst +- dyninst-devel +- dyninst-testsuite +- boost +- boost-devel +- elfutils-libelf-devel +- libdwarf-devel +- gcc-c++ +duration: 360m +extra-summary: /tools/dyninst/Sanity/testsuite +extra-task: /tools/dyninst/Sanity/testsuite diff --git a/tests/Sanity/testsuite/runtest.sh b/tests/Sanity/testsuite/runtest.sh new file mode 100755 index 0000000..cc7aeea --- /dev/null +++ b/tests/Sanity/testsuite/runtest.sh @@ -0,0 +1,69 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/dyninst/Sanity/testsuite +# Description: Basic functionality covering testsuite +# Author: Michael Petlan +# Martin Cermak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2013 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# 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, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE=${PACKAGE:-dyninst} +TESTDIR=${TESTDIR:-/usr/lib64/dyninst/testsuite} + +# Tests known to fail +SKIPLIST=test_thread_2,pc_thread,pc_tls,test_reloc,test_thread_3,\ +test_thread_5,test_thread_6,test_thread_8 + + +rlJournalStart + rlPhaseStartSetup + rlRun "rpm -q $PACKAGE $PACKAGE-testsuite" + + DYNINSTAPI_RT_LIB=$(rpm -ql $PACKAGE | fgrep libdyninstAPI_RT.so | sort | tail -1) + + LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$TESTDIR" + LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$(dirname $DYNINSTAPI_RT_LIB)" + LD_LIBRARY_PATH=${LD_LIBRARY_PATH#:} + + export DYNINSTAPI_RT_LIB + export LD_LIBRARY_PATH + + rlRun "setsebool allow_execmod on" + rlRun "setsebool allow_execstack on" + rlRun "setsebool deny_ptrace off" + + rlRun "pushd $TESTDIR" + rlPhaseEnd + + rlPhaseStartTest + rlRun "./runTests -v++ -allmode -allcompilers -allopt -exclude $SKIPLIST" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd From e350d4cd07c43bb575026247f01c598843547bbe Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 01:31:00 +0000 Subject: [PATCH 17/55] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- dyninst.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dyninst.spec b/dyninst.spec index 109acd4..16b4f77 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst Group: Development/Libraries -Release: 1%{?dist} +Release: 2%{?dist} URL: http://www.dyninst.org Version: 12.0.1 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 @@ -192,6 +192,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 12.0.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Mon Jan 10 2022 Stan Cox - 12.0.1-1 - Update to 12.0.1 From 5c6c00a9e5788135397daad297a3d31b5c226a3c Mon Sep 17 00:00:00 2001 From: Stan Cox Date: Mon, 7 Feb 2022 17:01:36 -0500 Subject: [PATCH 18/55] Quiesce dwarf 5 warnings --- dwarf-error.patch | 11 +++++++++++ dyninst.spec | 7 ++++++- rhbz2034662.patch | 4 ++-- 3 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 dwarf-error.patch diff --git a/dwarf-error.patch b/dwarf-error.patch new file mode 100644 index 0000000..60baeca --- /dev/null +++ b/dwarf-error.patch @@ -0,0 +1,11 @@ +Remove extraneous error messages of the form: + err message: .debug_loclists section missing + err message: invalid DWARF +which are repeated in some circumstances without adding useful context + +--- dyninst-12.0.1/symtabAPI/src/dwarfWalker.C ++++ dyninst-12.0.1/symtabAPI/src/dwarfWalker.C +@@ -1858,1 +1858,1 @@ +- cerr << "err message: " << dwarf_errmsg(dwarf_errno()) << endl; ++ dwarf_printf("(0x%lx) Error while decoding location: %s\n", id(), dwarf_errmsg(dwarf_errno())); + diff --git a/dyninst.spec b/dyninst.spec index 16b4f77..b53c034 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst Group: Development/Libraries -Release: 2%{?dist} +Release: 3%{?dist} URL: http://www.dyninst.org Version: 12.0.1 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 @@ -12,6 +12,7 @@ Source0: https://github.com/dyninst/dyninst/archive/v%{version}/dyninst-%{versio Source1: https://github.com/dyninst/testsuite/archive/%{__testsuite_version}/testsuite-%{__testsuite_version}.tar.gz Patch1: rhbz2034662.patch +Patch2: dwarf-error.patch %global dyninst_base dyninst-%{version} %global testsuite_base testsuite-%{__testsuite_version} @@ -81,6 +82,7 @@ making sure that dyninst works properly. pushd %{dyninst_base} %patch1 -p1 -b .2034662 +%patch2 -p1 -b .dwerr popd pushd %{testsuite_base} @@ -192,6 +194,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Mon Feb 07 2022 Stan Cox - 12.0.1-3 +- Quiesce dwarf 5 warnings + * Thu Jan 20 2022 Fedora Release Engineering - 12.0.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/rhbz2034662.patch b/rhbz2034662.patch index 7e9d6b5..34e2d42 100644 --- a/rhbz2034662.patch +++ b/rhbz2034662.patch @@ -3,8 +3,8 @@ Remove interposed definition of _r_debug Previously there was a dynamic relocation against _r_debug in the loader which picked up the interposed definition, but glibc now uses a direct internal hidden symbol reference and thus no longer updates the interposed object. ---- dyninst-12.0.0/dyninstAPI_RT/src/RTlinux.c -+++ dyninst-12.0.0/dyninstAPI_RT/src/RTlinux.c +--- dyninst-12.0.1/dyninstAPI_RT/src/RTlinux.c ++++ dyninst-12.0.1/dyninstAPI_RT/src/RTlinux.c @@ -404,7 +404,6 @@ void dyninstTrapHandler(int sig, siginfo_t *sg, ucontext_t *context) #if defined(cap_binary_rewriter) From c2951e4bc53a73022b738dd8cbcf773ce144f098 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Sat, 5 Mar 2022 14:37:16 -0700 Subject: [PATCH 19/55] Fix cmake build dir --- dyninst.spec | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dyninst.spec b/dyninst.spec index b53c034..5cd9c1a 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst Group: Development/Libraries -Release: 3%{?dist} +Release: 4%{?dist} URL: http://www.dyninst.org Version: 12.0.1 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 @@ -112,8 +112,7 @@ export CFLAGS CXXFLAGS LDFLAGS -DINSTALL_INCLUDE_DIR:PATH=%{_includedir}/dyninst \ -DINSTALL_CMAKE_DIR:PATH=%{_libdir}/cmake/Dyninst \ -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_SKIP_RPATH:BOOL=YES \ - . + -DCMAKE_SKIP_RPATH:BOOL=YES %cmake_build # Hack to install dyninst nearby, so the testsuite can use it @@ -130,8 +129,7 @@ cd ../%{testsuite_base} -DDyninst_DIR:PATH=$PWD/../install%{_libdir}/cmake/Dyninst \ -DINSTALL_DIR:PATH=%{_libdir}/dyninst/testsuite \ -DCMAKE_BUILD_TYPE:STRING=Debug \ - -DCMAKE_SKIP_RPATH:BOOL=YES \ - . + -DCMAKE_SKIP_RPATH:BOOL=YES %cmake_build %install @@ -194,6 +192,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Sat Mar 05 2022 Orion Poplawski - 12.0.1-4 +- Fix cmake build dir + * Mon Feb 07 2022 Stan Cox - 12.0.1-3 - Quiesce dwarf 5 warnings From c7e910447ccdd68f12d9452e5e4007e20f3c0f87 Mon Sep 17 00:00:00 2001 From: William Cohen Date: Thu, 10 Mar 2022 13:52:19 -0500 Subject: [PATCH 20/55] Update to 12.1.0 --- .gitignore | 2 ++ dyninst.spec | 11 ++++++----- rhbz2034662.patch | 15 --------------- sources | 4 ++-- 4 files changed, 10 insertions(+), 22 deletions(-) delete mode 100644 rhbz2034662.patch diff --git a/.gitignore b/.gitignore index b5ef857..dd0cfcc 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,5 @@ /testsuite-11.0.1.tar.gz /dyninst-12.0.1.tar.gz /testsuite-12.0.0.tar.gz +/dyninst-12.1.0.tar.gz +/testsuite-12.1.0.tar.gz diff --git a/dyninst.spec b/dyninst.spec index 5cd9c1a..1839eef 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,16 +2,15 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst Group: Development/Libraries -Release: 4%{?dist} +Release: 1%{?dist} URL: http://www.dyninst.org -Version: 12.0.1 +Version: 12.1.0 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 -%define __testsuite_version 12.0.0 +%define __testsuite_version 12.1.0 Source0: https://github.com/dyninst/dyninst/archive/v%{version}/dyninst-%{version}.tar.gz Source1: https://github.com/dyninst/testsuite/archive/%{__testsuite_version}/testsuite-%{__testsuite_version}.tar.gz -Patch1: rhbz2034662.patch Patch2: dwarf-error.patch %global dyninst_base dyninst-%{version} @@ -81,7 +80,6 @@ making sure that dyninst works properly. %setup -q -T -D -a 1 pushd %{dyninst_base} -%patch1 -p1 -b .2034662 %patch2 -p1 -b .dwerr popd @@ -192,6 +190,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Thu Mar 10 2022 William Cohen - 12.1.0-1 +- Update to 12.1.0 + * Sat Mar 05 2022 Orion Poplawski - 12.0.1-4 - Fix cmake build dir diff --git a/rhbz2034662.patch b/rhbz2034662.patch deleted file mode 100644 index 34e2d42..0000000 --- a/rhbz2034662.patch +++ /dev/null @@ -1,15 +0,0 @@ -Remove interposed definition of _r_debug - -Previously there was a dynamic relocation against _r_debug in the loader which picked up the interposed definition, -but glibc now uses a direct internal hidden symbol reference and thus no longer updates the interposed object. - ---- dyninst-12.0.1/dyninstAPI_RT/src/RTlinux.c -+++ dyninst-12.0.1/dyninstAPI_RT/src/RTlinux.c -@@ -404,7 +404,6 @@ void dyninstTrapHandler(int sig, siginfo_t *sg, ucontext_t *context) - #if defined(cap_binary_rewriter) - - extern struct r_debug _r_debug; --DLLEXPORT struct r_debug _r_debug __attribute__ ((weak)); - - /* Verify that the r_debug variable is visible */ - void r_debugCheck() { assert(_r_debug.r_map); } diff --git a/sources b/sources index 33751cd..bc3a810 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (dyninst-12.0.1.tar.gz) = 7827d4fa84ed15773e191b36612a3eab4e4b5451b1c645d0899056b831d7fdaa5b2ee439287ef0755d68f7d3a7882139f7d79b4a318700a676c3f0fc687482ad -SHA512 (testsuite-12.0.0.tar.gz) = 7e39b0e1f1a7687abebcf44c59124855d4128ce8820b6a31efa987441c1d94b19a315b208a7ef56c57e5ca91e12d5388f2cd8298791500a98ffa4d3790507f27 +SHA512 (dyninst-12.1.0.tar.gz) = ec09b83f288afefd6a30a3253c91554d421305a43c2f2384435207dcabf523d5498d64873f876817c3108c3fc0a43fd4c48ce2c1ca873c73fb98a2d823446549 +SHA512 (testsuite-12.1.0.tar.gz) = 884a33c5b912249166acc0c52bd0ab02b578dcea2a24fbfa2abc7887b6a9c4f3a113934b96079653d60d9dba34c8870eff7d08388c906111a024ec92e629798a From 0b66d3bae349f158d40292f1db238d0e3fdd6dad Mon Sep 17 00:00:00 2001 From: Thomas Rodgers Date: Wed, 4 May 2022 11:38:17 +0200 Subject: [PATCH 21/55] Rebuilt for Boost 1.78 --- dyninst.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dyninst.spec b/dyninst.spec index 1839eef..2158b32 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst Group: Development/Libraries -Release: 1%{?dist} +Release: 2%{?dist} URL: http://www.dyninst.org Version: 12.1.0 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 @@ -190,6 +190,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Wed May 04 2022 Thomas Rodgers - 12.1.0-2 +- Rebuilt for Boost 1.78 + * Thu Mar 10 2022 William Cohen - 12.1.0-1 - Update to 12.1.0 From 6d48c36717bd1b9ee66409c3358c3a9bae1a27a7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 21 Jul 2022 01:29:24 +0000 Subject: [PATCH 22/55] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- dyninst.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dyninst.spec b/dyninst.spec index 2158b32..50febaa 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst Group: Development/Libraries -Release: 2%{?dist} +Release: 3%{?dist} URL: http://www.dyninst.org Version: 12.1.0 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 @@ -190,6 +190,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Thu Jul 21 2022 Fedora Release Engineering - 12.1.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Wed May 04 2022 Thomas Rodgers - 12.1.0-2 - Rebuilt for Boost 1.78 From c69dd4f6e2480d6674428ed862fb4f11af5b847e Mon Sep 17 00:00:00 2001 From: Stan Cox Date: Wed, 3 Aug 2022 11:45:04 -0400 Subject: [PATCH 23/55] Explicitly include time.h when building the testsuite --- cmdline.patch | 12 ++++++++++++ dwarf-error.patch | 4 ++-- dyninst.spec | 11 ++++++++--- 3 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 cmdline.patch diff --git a/cmdline.patch b/cmdline.patch new file mode 100644 index 0000000..5286c2a --- /dev/null +++ b/cmdline.patch @@ -0,0 +1,12 @@ +# c++/12/bits/basic_string.h in libstdc++-devel-12.1.1-3 no longer includes +# atomicity.h includes gthr -> gthr-default -> pthread .h -> time.h -> struct-tm.h +# so explicitly include time.h + +--- testsuite-12.1.0/src/CmdLine.C ++++ testsuite-12.1.0/src/CmdLine.C +@@ -38,5 +38,3 @@ + +-#if defined(os_windows_test) + #include +-#endif + diff --git a/dwarf-error.patch b/dwarf-error.patch index 60baeca..9efff30 100644 --- a/dwarf-error.patch +++ b/dwarf-error.patch @@ -3,8 +3,8 @@ Remove extraneous error messages of the form: err message: invalid DWARF which are repeated in some circumstances without adding useful context ---- dyninst-12.0.1/symtabAPI/src/dwarfWalker.C -+++ dyninst-12.0.1/symtabAPI/src/dwarfWalker.C +--- dyninst-12.1.0/symtabAPI/src/dwarfWalker.C ++++ dyninst-12.1.0/symtabAPI/src/dwarfWalker.C @@ -1858,1 +1858,1 @@ - cerr << "err message: " << dwarf_errmsg(dwarf_errno()) << endl; + dwarf_printf("(0x%lx) Error while decoding location: %s\n", id(), dwarf_errmsg(dwarf_errno())); diff --git a/dyninst.spec b/dyninst.spec index 50febaa..6502f06 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst Group: Development/Libraries -Release: 3%{?dist} +Release: 4%{?dist} URL: http://www.dyninst.org Version: 12.1.0 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 @@ -11,7 +11,8 @@ ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 Source0: https://github.com/dyninst/dyninst/archive/v%{version}/dyninst-%{version}.tar.gz Source1: https://github.com/dyninst/testsuite/archive/%{__testsuite_version}/testsuite-%{__testsuite_version}.tar.gz -Patch2: dwarf-error.patch +Patch1: dwarf-error.patch +Patch2: cmdline.patch %global dyninst_base dyninst-%{version} %global testsuite_base testsuite-%{__testsuite_version} @@ -80,10 +81,11 @@ making sure that dyninst works properly. %setup -q -T -D -a 1 pushd %{dyninst_base} -%patch2 -p1 -b .dwerr +%patch1 -p1 -b .dwerr popd pushd %{testsuite_base} +%patch2 -p1 -b .cmdline popd # cotire seems to cause non-deterministic gcc errors @@ -190,6 +192,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Wed Aug 03 2022 Stan Cox - 12.1.0-4 +- Explicitly include time.h as no longer pulls it in + * Thu Jul 21 2022 Fedora Release Engineering - 12.1.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 6f56eaefa416d3f6f8c0ef161652dcbf5a046738 Mon Sep 17 00:00:00 2001 From: William Cohen Date: Tue, 4 Oct 2022 09:56:25 -0400 Subject: [PATCH 24/55] Update to 12.2.0 --- .gitignore | 2 ++ dyninst.spec | 13 ++++++------- sources | 4 ++-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index dd0cfcc..c757da9 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,5 @@ /testsuite-12.0.0.tar.gz /dyninst-12.1.0.tar.gz /testsuite-12.1.0.tar.gz +/dyninst-12.2.0.tar.gz +/testsuite-12.2.0.tar.gz diff --git a/dyninst.spec b/dyninst.spec index 6502f06..17cf796 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,12 +2,12 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst Group: Development/Libraries -Release: 4%{?dist} +Release: 1%{?dist} URL: http://www.dyninst.org -Version: 12.1.0 +Version: 12.2.0 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 -%define __testsuite_version 12.1.0 +%define __testsuite_version 12.2.0 Source0: https://github.com/dyninst/dyninst/archive/v%{version}/dyninst-%{version}.tar.gz Source1: https://github.com/dyninst/testsuite/archive/%{__testsuite_version}/testsuite-%{__testsuite_version}.tar.gz @@ -137,10 +137,6 @@ cd ../%{testsuite_base} cd %{dyninst_base} %cmake_install -# It doesn't install docs the way we want, so remove them. -# We'll just grab the pdfs later, directly from the build dir. -rm -v %{buildroot}%{_docdir}/*-%{version}.pdf - cd ../%{testsuite_base} %cmake_install @@ -192,6 +188,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Tue Oct 4 2022 William Cohen - 12.2.0-1 +- Update to 12.2.0 + * Wed Aug 03 2022 Stan Cox - 12.1.0-4 - Explicitly include time.h as no longer pulls it in diff --git a/sources b/sources index bc3a810..48d6b2a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (dyninst-12.1.0.tar.gz) = ec09b83f288afefd6a30a3253c91554d421305a43c2f2384435207dcabf523d5498d64873f876817c3108c3fc0a43fd4c48ce2c1ca873c73fb98a2d823446549 -SHA512 (testsuite-12.1.0.tar.gz) = 884a33c5b912249166acc0c52bd0ab02b578dcea2a24fbfa2abc7887b6a9c4f3a113934b96079653d60d9dba34c8870eff7d08388c906111a024ec92e629798a +SHA512 (dyninst-12.2.0.tar.gz) = 3c29b77bd2213c58ec0ccb04a8cc70314b66924a151f29b30de14d171cf5d61b53a323d97456e51687d02e6c6095bb8b0e6eab103a75f150507c4eb8657f258c +SHA512 (testsuite-12.2.0.tar.gz) = 4510de4413989a558697c3cf7dbd742d2ccc2c31603f04ed87dc4d7d90908ba99a6993e1a84f820caadbbf46f190ce85c99bbb1030a1fac7022a662f8439bed5 From 7ff5c1b1b5cdfd096dbbdb3eb23fb63652039f37 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 01:58:54 +0000 Subject: [PATCH 25/55] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- dyninst.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dyninst.spec b/dyninst.spec index 17cf796..1f8937c 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst Group: Development/Libraries -Release: 1%{?dist} +Release: 2%{?dist} URL: http://www.dyninst.org Version: 12.2.0 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 @@ -188,6 +188,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 12.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Tue Oct 4 2022 William Cohen - 12.2.0-1 - Update to 12.2.0 From 511a74a18bb3be1f7727ce517ed72fe09153a991 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 20 Feb 2023 21:53:20 +0000 Subject: [PATCH 26/55] Rebuilt for Boost 1.81 --- dyninst.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dyninst.spec b/dyninst.spec index 1f8937c..b03feaa 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst Group: Development/Libraries -Release: 2%{?dist} +Release: 3%{?dist} URL: http://www.dyninst.org Version: 12.2.0 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 @@ -188,6 +188,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Mon Feb 20 2023 Jonathan Wakely - 12.2.0-3 +- Rebuilt for Boost 1.81 + * Thu Jan 19 2023 Fedora Release Engineering - 12.2.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 765f4348303edadb9566cef340e8e817add66836 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Thu, 23 Feb 2023 15:26:31 -0500 Subject: [PATCH 27/55] rhbz2173030 --- dyninst.spec | 10 +++++++- rhbz2173030.patch | 62 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 rhbz2173030.patch diff --git a/dyninst.spec b/dyninst.spec index b03feaa..fc24e7f 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst Group: Development/Libraries -Release: 3%{?dist} +Release: 4%{?dist} URL: http://www.dyninst.org Version: 12.2.0 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 @@ -13,6 +13,7 @@ Source1: https://github.com/dyninst/testsuite/archive/%{__testsuite_version}/tes Patch1: dwarf-error.patch Patch2: cmdline.patch +Patch3: rhbz2173030.patch %global dyninst_base dyninst-%{version} %global testsuite_base testsuite-%{__testsuite_version} @@ -88,6 +89,10 @@ pushd %{testsuite_base} %patch2 -p1 -b .cmdline popd +pushd %{dyninst_base} +%patch3 -p1 +popd + # cotire seems to cause non-deterministic gcc errors # https://bugzilla.redhat.com/show_bug.cgi?id=1420551 sed -i.cotire -e 's/USE_COTIRE true/USE_COTIRE false/' \ @@ -188,6 +193,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Thu Feb 23 2023 Frank Ch. Eigler - 12.2.0-4 +- rhbz2173030: ftbfs with gcc 13 + * Mon Feb 20 2023 Jonathan Wakely - 12.2.0-3 - Rebuilt for Boost 1.81 diff --git a/rhbz2173030.patch b/rhbz2173030.patch new file mode 100644 index 0000000..2a165e9 --- /dev/null +++ b/rhbz2173030.patch @@ -0,0 +1,62 @@ +commit 358db4610e4919690d928797713bef3cf67ef61d +gpg: Signature made Wed 22 Feb 2023 10:51:01 AM EST +gpg: using RSA key 4AEE18F83AFDEB23 +gpg: Good signature from "GitHub (web-flow commit signing) " [full] +Author: kupsch +Date: Wed Feb 22 09:51:01 2023 -0600 + + explicitly include (#1384) + + - std::array is used in this file, but not included explicitly as + on many systems this header is implicitly included recursively + via another included file. On new versions of headers this may + no longer be the case, so explicitly include it. + +diff --git a/instructionAPI/src/InstructionDecoder-aarch64.h b/instructionAPI/src/InstructionDecoder-aarch64.h +index 7994d0b1cc81..ae516232a68b 100644 +--- a/instructionAPI/src/InstructionDecoder-aarch64.h ++++ b/instructionAPI/src/InstructionDecoder-aarch64.h +@@ -28,6 +28,7 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + ++#include + #include "InstructionDecoderImpl.h" + #include + #include "Immediate.h" + +commit 0cd2b8b7858f48cd60e070010bb6600a1f44180e +gpg: Signature made Wed 22 Feb 2023 04:03:20 PM EST +gpg: using RSA key 4AEE18F83AFDEB23 +gpg: Good signature from "GitHub (web-flow commit signing) " [full] +Author: Tim Haines +Date: Wed Feb 22 15:03:20 2023 -0600 + + Add missing includes (#1385) + + These were showing up on ufront@rice. + +diff --git a/instructionAPI/src/AMDGPU/cdna2/InstructionDecoder-amdgpu-cdna2.C b/instructionAPI/src/AMDGPU/cdna2/InstructionDecoder-amdgpu-cdna2.C +index e852f47437a1..f62b1f5463e8 100644 +--- a/instructionAPI/src/AMDGPU/cdna2/InstructionDecoder-amdgpu-cdna2.C ++++ b/instructionAPI/src/AMDGPU/cdna2/InstructionDecoder-amdgpu-cdna2.C +@@ -30,6 +30,7 @@ + + #include "Ternary.h" + #include "InstructionDecoder-amdgpu-cdna2.h" ++#include + + namespace Dyninst { + namespace InstructionAPI { +diff --git a/instructionAPI/src/AMDGPU/vega/InstructionDecoder-amdgpu-vega.C b/instructionAPI/src/AMDGPU/vega/InstructionDecoder-amdgpu-vega.C +index 449255ae00b4..3093ece41002 100644 +--- a/instructionAPI/src/AMDGPU/vega/InstructionDecoder-amdgpu-vega.C ++++ b/instructionAPI/src/AMDGPU/vega/InstructionDecoder-amdgpu-vega.C +@@ -30,6 +30,7 @@ + + #include "Ternary.h" + #include "InstructionDecoder-amdgpu-vega.h" ++#include + + namespace Dyninst { + namespace InstructionAPI { From df818674e3bb6e08872b83471069bfc7a18beb30 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Thu, 23 Feb 2023 15:53:39 -0500 Subject: [PATCH 28/55] rhbz2173030 cont'd - backport dyninst upstream commits 0cd2b8b7858 358db4610e49 2e3bf92eedf575 --- rhbz2173030.patch | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/rhbz2173030.patch b/rhbz2173030.patch index 2a165e9..d04b67e 100644 --- a/rhbz2173030.patch +++ b/rhbz2173030.patch @@ -60,3 +60,29 @@ index 449255ae00b4..3093ece41002 100644 namespace Dyninst { namespace InstructionAPI { +commit 2e3bf92eedf575c780e4381ae810a050ee404f03 +gpg: Signature made Thu 05 Jan 2023 02:13:14 PM EST +gpg: using RSA key 4AEE18F83AFDEB23 +gpg: Good signature from "GitHub (web-flow commit signing) " [full] +Author: kupsch +Date: Thu Jan 5 13:13:14 2023 -0600 + + add missing include file (#1344) + + - add missing #include + + On more platforms and library combinations is included via + some other header, but there is combination where this is not true + +diff --git a/dataflowAPI/src/AbslocInterface.C b/dataflowAPI/src/AbslocInterface.C +index 9d7ad000c2b6..582e64004967 100644 +--- a/dataflowAPI/src/AbslocInterface.C ++++ b/dataflowAPI/src/AbslocInterface.C +@@ -29,6 +29,7 @@ + */ + + ++#include + #include "Absloc.h" + #include "AbslocInterface.h" + From 05e041c92007b29f0f22af4aa3cf2a73c3bc4567 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Fri, 9 Jun 2023 20:11:41 -0600 Subject: [PATCH 29/55] Update to 12.3.0 Add patch for cmake 3.27 support --- .gitignore | 2 + cmdline.patch | 12 ------ dyninst-cmake3.27.patch | 11 ++++++ dyninst.spec | 27 ++++++------- rhbz2173030.patch | 88 ----------------------------------------- sources | 4 +- 6 files changed, 27 insertions(+), 117 deletions(-) delete mode 100644 cmdline.patch create mode 100644 dyninst-cmake3.27.patch delete mode 100644 rhbz2173030.patch diff --git a/.gitignore b/.gitignore index c757da9..9423139 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,5 @@ /testsuite-12.1.0.tar.gz /dyninst-12.2.0.tar.gz /testsuite-12.2.0.tar.gz +/dyninst-12.3.0.tar.gz +/testsuite-12.3.0.tar.gz diff --git a/cmdline.patch b/cmdline.patch deleted file mode 100644 index 5286c2a..0000000 --- a/cmdline.patch +++ /dev/null @@ -1,12 +0,0 @@ -# c++/12/bits/basic_string.h in libstdc++-devel-12.1.1-3 no longer includes -# atomicity.h includes gthr -> gthr-default -> pthread .h -> time.h -> struct-tm.h -# so explicitly include time.h - ---- testsuite-12.1.0/src/CmdLine.C -+++ testsuite-12.1.0/src/CmdLine.C -@@ -38,5 +38,3 @@ - --#if defined(os_windows_test) - #include --#endif - diff --git a/dyninst-cmake3.27.patch b/dyninst-cmake3.27.patch new file mode 100644 index 0000000..c9da62a --- /dev/null +++ b/dyninst-cmake3.27.patch @@ -0,0 +1,11 @@ +diff -up dyninst-12.3.0/cmake/warnings.cmake.cmake3.27 dyninst-12.3.0/cmake/warnings.cmake +--- dyninst-12.3.0/cmake/warnings.cmake.cmake3.27 2023-02-22 14:39:56.000000000 -0700 ++++ dyninst-12.3.0/cmake/warnings.cmake 2023-06-09 19:59:32.831350952 -0600 +@@ -127,6 +127,7 @@ endif() + + if(CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|Clang)$") + include(CheckCXXCompilerFlag) ++ include(CheckCXXSourceCompiles) + foreach(f IN LISTS REQUESTED_WARNING_FLAGS) + string(REGEX REPLACE "[^a-zA-Z0-9]" "_" v "HAS_CPP_FLAG_${f}") + set(CMAKE_REQUIRED_FLAGS "-${f}") diff --git a/dyninst.spec b/dyninst.spec index fc24e7f..b9d8e29 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,18 +2,18 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst Group: Development/Libraries -Release: 4%{?dist} +Release: 1%{?dist} URL: http://www.dyninst.org -Version: 12.2.0 +Version: 12.3.0 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 -%define __testsuite_version 12.2.0 +%define __testsuite_version 12.3.0 Source0: https://github.com/dyninst/dyninst/archive/v%{version}/dyninst-%{version}.tar.gz -Source1: https://github.com/dyninst/testsuite/archive/%{__testsuite_version}/testsuite-%{__testsuite_version}.tar.gz +Source1: https://github.com/dyninst/testsuite/archive/v%{__testsuite_version}/testsuite-%{__testsuite_version}.tar.gz Patch1: dwarf-error.patch -Patch2: cmdline.patch -Patch3: rhbz2173030.patch +# Support cmake 3.27 - https://github.com/dyninst/dyninst/pull/1438 +Patch2: dyninst-cmake3.27.patch %global dyninst_base dyninst-%{version} %global testsuite_base testsuite-%{__testsuite_version} @@ -82,15 +82,8 @@ making sure that dyninst works properly. %setup -q -T -D -a 1 pushd %{dyninst_base} -%patch1 -p1 -b .dwerr -popd - -pushd %{testsuite_base} -%patch2 -p1 -b .cmdline -popd - -pushd %{dyninst_base} -%patch3 -p1 +%patch -P1 -p1 -b .dwerr +%patch -P2 -p1 -b .cmake3.27 popd # cotire seems to cause non-deterministic gcc errors @@ -193,6 +186,10 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Sat Jun 10 2023 Orion Poplawski - 12.3.0-1 +- Update to 12.3.0 +- Add patch for cmake 3.27 support + * Thu Feb 23 2023 Frank Ch. Eigler - 12.2.0-4 - rhbz2173030: ftbfs with gcc 13 diff --git a/rhbz2173030.patch b/rhbz2173030.patch deleted file mode 100644 index d04b67e..0000000 --- a/rhbz2173030.patch +++ /dev/null @@ -1,88 +0,0 @@ -commit 358db4610e4919690d928797713bef3cf67ef61d -gpg: Signature made Wed 22 Feb 2023 10:51:01 AM EST -gpg: using RSA key 4AEE18F83AFDEB23 -gpg: Good signature from "GitHub (web-flow commit signing) " [full] -Author: kupsch -Date: Wed Feb 22 09:51:01 2023 -0600 - - explicitly include (#1384) - - - std::array is used in this file, but not included explicitly as - on many systems this header is implicitly included recursively - via another included file. On new versions of headers this may - no longer be the case, so explicitly include it. - -diff --git a/instructionAPI/src/InstructionDecoder-aarch64.h b/instructionAPI/src/InstructionDecoder-aarch64.h -index 7994d0b1cc81..ae516232a68b 100644 ---- a/instructionAPI/src/InstructionDecoder-aarch64.h -+++ b/instructionAPI/src/InstructionDecoder-aarch64.h -@@ -28,6 +28,7 @@ - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -+#include - #include "InstructionDecoderImpl.h" - #include - #include "Immediate.h" - -commit 0cd2b8b7858f48cd60e070010bb6600a1f44180e -gpg: Signature made Wed 22 Feb 2023 04:03:20 PM EST -gpg: using RSA key 4AEE18F83AFDEB23 -gpg: Good signature from "GitHub (web-flow commit signing) " [full] -Author: Tim Haines -Date: Wed Feb 22 15:03:20 2023 -0600 - - Add missing includes (#1385) - - These were showing up on ufront@rice. - -diff --git a/instructionAPI/src/AMDGPU/cdna2/InstructionDecoder-amdgpu-cdna2.C b/instructionAPI/src/AMDGPU/cdna2/InstructionDecoder-amdgpu-cdna2.C -index e852f47437a1..f62b1f5463e8 100644 ---- a/instructionAPI/src/AMDGPU/cdna2/InstructionDecoder-amdgpu-cdna2.C -+++ b/instructionAPI/src/AMDGPU/cdna2/InstructionDecoder-amdgpu-cdna2.C -@@ -30,6 +30,7 @@ - - #include "Ternary.h" - #include "InstructionDecoder-amdgpu-cdna2.h" -+#include - - namespace Dyninst { - namespace InstructionAPI { -diff --git a/instructionAPI/src/AMDGPU/vega/InstructionDecoder-amdgpu-vega.C b/instructionAPI/src/AMDGPU/vega/InstructionDecoder-amdgpu-vega.C -index 449255ae00b4..3093ece41002 100644 ---- a/instructionAPI/src/AMDGPU/vega/InstructionDecoder-amdgpu-vega.C -+++ b/instructionAPI/src/AMDGPU/vega/InstructionDecoder-amdgpu-vega.C -@@ -30,6 +30,7 @@ - - #include "Ternary.h" - #include "InstructionDecoder-amdgpu-vega.h" -+#include - - namespace Dyninst { - namespace InstructionAPI { -commit 2e3bf92eedf575c780e4381ae810a050ee404f03 -gpg: Signature made Thu 05 Jan 2023 02:13:14 PM EST -gpg: using RSA key 4AEE18F83AFDEB23 -gpg: Good signature from "GitHub (web-flow commit signing) " [full] -Author: kupsch -Date: Thu Jan 5 13:13:14 2023 -0600 - - add missing include file (#1344) - - - add missing #include - - On more platforms and library combinations is included via - some other header, but there is combination where this is not true - -diff --git a/dataflowAPI/src/AbslocInterface.C b/dataflowAPI/src/AbslocInterface.C -index 9d7ad000c2b6..582e64004967 100644 ---- a/dataflowAPI/src/AbslocInterface.C -+++ b/dataflowAPI/src/AbslocInterface.C -@@ -29,6 +29,7 @@ - */ - - -+#include - #include "Absloc.h" - #include "AbslocInterface.h" - diff --git a/sources b/sources index 48d6b2a..eb53865 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (dyninst-12.2.0.tar.gz) = 3c29b77bd2213c58ec0ccb04a8cc70314b66924a151f29b30de14d171cf5d61b53a323d97456e51687d02e6c6095bb8b0e6eab103a75f150507c4eb8657f258c -SHA512 (testsuite-12.2.0.tar.gz) = 4510de4413989a558697c3cf7dbd742d2ccc2c31603f04ed87dc4d7d90908ba99a6993e1a84f820caadbbf46f190ce85c99bbb1030a1fac7022a662f8439bed5 +SHA512 (dyninst-12.3.0.tar.gz) = 894980c2ce0701c0544877e841e2933a59963eb49ff9b8cde17f67e300d618b77e9fc95f60301a4b8ecaee729010fbab3ec78ef6e2c2fcea118c56d26cb1c3ce +SHA512 (testsuite-12.3.0.tar.gz) = c8d09395cc37ac1ebbd73049e365b703d1fc904d84b73c7749809d8f9dc36ce0b3b842a2fa9e28ba6ffda4e6d2aeb4ca70c2265d3cacc199db3d10c26a12df33 From afaa35c98c4a6c46cd3970ebda7843002ba2b5f1 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 27 Jun 2023 22:37:31 +0100 Subject: [PATCH 30/55] Patch for oneTBB (#2036372) Update FindTBB.cmake to look in the new version.h header. Fix the incorrect allocator used with tbb::concurrent_hash_map. Define a tbb_hash_compare specialization for std::pair to cope with the deprecated tbb_hasher function being removed. Adjust tbb_hash_compare specialization to account for TBB 2021.x defining it in a different namespace. --- dyninst.spec | 7 ++++- onetbb.patch | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 onetbb.patch diff --git a/dyninst.spec b/dyninst.spec index fc24e7f..72f03c7 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst Group: Development/Libraries -Release: 4%{?dist} +Release: 5%{?dist} URL: http://www.dyninst.org Version: 12.2.0 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 @@ -14,6 +14,7 @@ Source1: https://github.com/dyninst/testsuite/archive/%{__testsuite_version}/tes Patch1: dwarf-error.patch Patch2: cmdline.patch Patch3: rhbz2173030.patch +Patch4: onetbb.patch %global dyninst_base dyninst-%{version} %global testsuite_base testsuite-%{__testsuite_version} @@ -91,6 +92,7 @@ popd pushd %{dyninst_base} %patch3 -p1 +%patch4 -p1 popd # cotire seems to cause non-deterministic gcc errors @@ -193,6 +195,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Tue Jun 27 2023 Jonathan Wakely - 12.2.0-5 +- Patch for oneTBB (#2036372) + * Thu Feb 23 2023 Frank Ch. Eigler - 12.2.0-4 - rhbz2173030: ftbfs with gcc 13 diff --git a/onetbb.patch b/onetbb.patch new file mode 100644 index 0000000..87b72d0 --- /dev/null +++ b/onetbb.patch @@ -0,0 +1,89 @@ +--- dyninst-12.2.0/cmake/Modules/FindTBB.cmake~ 2023-06-27 22:52:25.396598265 +0100 ++++ dyninst-12.2.0/cmake/Modules/FindTBB.cmake 2023-06-27 22:52:27.776601825 +0100 +@@ -154,7 +154,8 @@ + if(TBB_INCLUDE_DIRS) + # Starting in 2020.1.1, tbb_stddef.h is replaced by version.h + set(_version_files "${TBB_INCLUDE_DIRS}/tbb/tbb_stddef.h" +- "${TBB_INCLUDE_DIRS}/tbb/version.h") ++ "${TBB_INCLUDE_DIRS}/tbb/version.h" ++ "${TBB_INCLUDE_DIRS}/oneapi/tbb/version.h") + foreach(f IN ITEMS ${_version_files}) + if(EXISTS ${f}) + set(_version_file ${f}) +--- dyninst-12.2.0/common/h/concurrent.h~ 2023-06-27 23:31:35.971166585 +0100 ++++ dyninst-12.2.0/common/h/concurrent.h 2023-06-27 23:32:31.889253848 +0100 +@@ -41,6 +41,22 @@ + #include + #include + ++#if __has_include() ++#include ++#if TBB_INTERFACE_VERSION_MAJOR >= 12 ++// oneTBB version of tbb_hash_compare doesn't work for std::pair. ++template ++struct tbb::tbb_hash_compare> { ++ static size_t hash(const std::pair& p) { ++ return tbb_hash_compare().hash(p.first) ^ tbb_hash_compare().hash(p.second); ++ } ++ static bool equal(const std::pair& p1, const std::pair& p2) { ++ return p1 == p2; ++ } ++}; ++#endif ++#endif ++ + namespace Dyninst { + + namespace dyn_c_annotations { +@@ -54,10 +70,10 @@ + + template + class dyn_c_hash_map : protected tbb::concurrent_hash_map, std::allocator>> { ++ tbb::tbb_hash_compare, std::allocator>> { + + typedef tbb::concurrent_hash_map, std::allocator>> base; ++ tbb::tbb_hash_compare, std::allocator>> base; + public: + using typename base::value_type; + using typename base::mapped_type; +--- dyninst-12.2.0/symtabAPI/src/dwarfWalker.h~ 2023-06-27 23:49:03.290956830 +0100 ++++ dyninst-12.2.0/symtabAPI/src/dwarfWalker.h 2023-06-28 09:12:36.672398326 +0100 +@@ -35,22 +35,20 @@ + } + } + +-namespace tbb { +- using namespace Dyninst::SymtabAPI; +- template<> +- struct tbb_hash_compare { +- static size_t hash(const type_key& k) { +- size_t seed = 0; +- boost::hash_combine(seed, k.off); +- boost::hash_combine(seed, k.file); +- boost::hash_combine(seed, static_cast(k.m)); +- return seed; +- } +- static bool equal(const type_key& k1, const type_key& k2) { +- return (k1.off==k2.off && k1.file==k2.file && k1.m==k2.m); +- } +- }; +-} ++template<> ++struct tbb::tbb_hash_compare { ++ using type_key = Dyninst::SymtabAPI::type_key; ++ static size_t hash(const type_key& k) { ++ size_t seed = 0; ++ boost::hash_combine(seed, k.off); ++ boost::hash_combine(seed, k.file); ++ boost::hash_combine(seed, static_cast(k.m)); ++ return seed; ++ } ++ static bool equal(const type_key& k1, const type_key& k2) { ++ return (k1.off==k2.off && k1.file==k2.file && k1.m==k2.m); ++ } ++}; + + namespace Dyninst { + namespace SymtabAPI { From 3c9bcecebd997359364c74769219d1d33d0a1e73 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Tue, 4 Jul 2023 17:23:52 -0400 Subject: [PATCH 31/55] dyninst.spec: approximate SPDX License tag migration --- dyninst.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dyninst.spec b/dyninst.spec index 27a200c..34f1c47 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -1,5 +1,5 @@ Summary: An API for Run-time Code Generation -License: LGPLv2+ +License: LGPL-2.1-or-later AND GPL-3.0-or-later WITH Bison-exception-2.2 AND LicenseRef-Fedora-Public-Domain AND BSD-3-Clause Name: dyninst Group: Development/Libraries Release: 1%{?dist} @@ -56,6 +56,7 @@ Summary: Documentation for using the Dyninst API Group: Documentation %description doc dyninst-doc contains API documentation for the Dyninst libraries. +License: LGPL-2.1-or-later %package devel Summary: Header files for compiling programs with Dyninst @@ -63,6 +64,8 @@ Group: Development/System Requires: dyninst = %{version}-%{release} Requires: boost-devel Requires: tbb-devel +License: LGPL-2.1-or-later AND BSD-3-Clause AND MIT +# FindTBB.cmake: presumed MIT, removed in next version of dyninst %description devel dyninst-devel includes the C header files that specify the Dyninst user-space @@ -74,6 +77,9 @@ Summary: Programs for testing Dyninst Group: Development/System Requires: dyninst = %{version}-%{release} Requires: dyninst-devel = %{version}-%{release} +License: BSD-3-Clause AND LGPL-2.1-or-later + + %description testsuite dyninst-testsuite includes the test harness and target programs for making sure that dyninst works properly. @@ -189,6 +195,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %changelog +* Tue Jul 04 2023 Frank Ch. Eigler - 12.3.0-1 +- migrated to SPDX license + * Tue Jul 04 2023 Orion Poplawski - 12.3.0-1 - Update to 12.3.0 - Add patch for cmake 3.27 support From 8c06128c9fc4d16c99875afe8065c4dd3be3ab69 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Tue, 11 Jul 2023 19:29:04 -0400 Subject: [PATCH 32/55] release bump --- dyninst.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dyninst.spec b/dyninst.spec index 34f1c47..bb17289 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation License: LGPL-2.1-or-later AND GPL-3.0-or-later WITH Bison-exception-2.2 AND LicenseRef-Fedora-Public-Domain AND BSD-3-Clause Name: dyninst Group: Development/Libraries -Release: 1%{?dist} +Release: 2%{?dist} URL: http://www.dyninst.org Version: 12.3.0 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 @@ -194,6 +194,8 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Tue Jul 11 2023 Frank Ch. Eigler - 12.3.0-2 +- side-tag respin * Tue Jul 04 2023 Frank Ch. Eigler - 12.3.0-1 - migrated to SPDX license From 6fd60358419e515017a1e6b2dfdcd3041812e210 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jul 2023 18:05:53 +0000 Subject: [PATCH 33/55] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- dyninst.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dyninst.spec b/dyninst.spec index bb17289..ad70d78 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation License: LGPL-2.1-or-later AND GPL-3.0-or-later WITH Bison-exception-2.2 AND LicenseRef-Fedora-Public-Domain AND BSD-3-Clause Name: dyninst Group: Development/Libraries -Release: 2%{?dist} +Release: 3%{?dist} URL: http://www.dyninst.org Version: 12.3.0 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 @@ -194,6 +194,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Wed Jul 19 2023 Fedora Release Engineering - 12.3.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Tue Jul 11 2023 Frank Ch. Eigler - 12.3.0-2 - side-tag respin From b958d1d861d1bc2b479b4e79bf1533fb434d006f Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 17 Jan 2024 22:41:15 +0000 Subject: [PATCH 34/55] Rebuilt for Boost 1.83 --- dyninst.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dyninst.spec b/dyninst.spec index ad70d78..524b0d9 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation License: LGPL-2.1-or-later AND GPL-3.0-or-later WITH Bison-exception-2.2 AND LicenseRef-Fedora-Public-Domain AND BSD-3-Clause Name: dyninst Group: Development/Libraries -Release: 3%{?dist} +Release: 4%{?dist} URL: http://www.dyninst.org Version: 12.3.0 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 @@ -194,6 +194,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Wed Jan 17 2024 Jonathan Wakely - 12.3.0-4 +- Rebuilt for Boost 1.83 + * Wed Jul 19 2023 Fedora Release Engineering - 12.3.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 6b692d8ea31f8b637e36823e61ad97c02381a26d Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Fri, 19 Jan 2024 00:15:32 +0000 Subject: [PATCH 35/55] Fix CI gating plan Remove obsolete options. --- plans/ci.fmf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plans/ci.fmf b/plans/ci.fmf index 1ad2c12..3fd3ab7 100644 --- a/plans/ci.fmf +++ b/plans/ci.fmf @@ -1,6 +1,5 @@ summary: CI Gating Plan discover: how: fmf - directory: tests execute: - how: beakerlib + how: tmt From a4ccd3089072d54448b5a139d616eee3e0c44424 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jan 2024 17:44:17 +0000 Subject: [PATCH 36/55] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- dyninst.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dyninst.spec b/dyninst.spec index 524b0d9..4bd6980 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation License: LGPL-2.1-or-later AND GPL-3.0-or-later WITH Bison-exception-2.2 AND LicenseRef-Fedora-Public-Domain AND BSD-3-Clause Name: dyninst Group: Development/Libraries -Release: 4%{?dist} +Release: 5%{?dist} URL: http://www.dyninst.org Version: 12.3.0 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 @@ -194,6 +194,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Fri Jan 19 2024 Fedora Release Engineering - 12.3.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Wed Jan 17 2024 Jonathan Wakely - 12.3.0-4 - Rebuilt for Boost 1.83 From 7262c855913d1f272497bcadf6fd29e808f44169 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jan 2024 10:01:19 +0000 Subject: [PATCH 37/55] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- dyninst.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dyninst.spec b/dyninst.spec index 4bd6980..3982a2d 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation License: LGPL-2.1-or-later AND GPL-3.0-or-later WITH Bison-exception-2.2 AND LicenseRef-Fedora-Public-Domain AND BSD-3-Clause Name: dyninst Group: Development/Libraries -Release: 5%{?dist} +Release: 6%{?dist} URL: http://www.dyninst.org Version: 12.3.0 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 @@ -194,6 +194,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Wed Jan 24 2024 Fedora Release Engineering - 12.3.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 19 2024 Fedora Release Engineering - 12.3.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 407d316605b14c888b4c4fa890c2d02766a0b96f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 17 Jul 2024 21:35:55 +0000 Subject: [PATCH 38/55] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- dyninst.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dyninst.spec b/dyninst.spec index 3982a2d..059aa45 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation License: LGPL-2.1-or-later AND GPL-3.0-or-later WITH Bison-exception-2.2 AND LicenseRef-Fedora-Public-Domain AND BSD-3-Clause Name: dyninst Group: Development/Libraries -Release: 6%{?dist} +Release: 7%{?dist} URL: http://www.dyninst.org Version: 12.3.0 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 @@ -194,6 +194,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Wed Jul 17 2024 Fedora Release Engineering - 12.3.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Wed Jan 24 2024 Fedora Release Engineering - 12.3.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 0139cfdb77c9966cfae91ddaa91c86ebf02fa7d4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 16:29:54 +0000 Subject: [PATCH 39/55] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- dyninst.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dyninst.spec b/dyninst.spec index 059aa45..0d3ef86 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation License: LGPL-2.1-or-later AND GPL-3.0-or-later WITH Bison-exception-2.2 AND LicenseRef-Fedora-Public-Domain AND BSD-3-Clause Name: dyninst Group: Development/Libraries -Release: 7%{?dist} +Release: 8%{?dist} URL: http://www.dyninst.org Version: 12.3.0 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 @@ -194,6 +194,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Thu Jan 16 2025 Fedora Release Engineering - 12.3.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Wed Jul 17 2024 Fedora Release Engineering - 12.3.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 15cf32d088a98a08df8d1cd3db2dd6390829a3e8 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Thu, 23 Jan 2025 14:39:50 -0500 Subject: [PATCH 40/55] rhbz2339725: work around dyninst ftbfs on rawhide - switch to a recent git/master snapshot, after v13.0 - also: eliminating dyninst-testsuite --- .gitignore | 1 + dwarf-error.patch | 11 ----- dyninst-cmake3.27.patch | 11 ----- dyninst.spec | 105 +++++++++++----------------------------- onetbb.patch | 12 ----- sources | 3 +- 6 files changed, 30 insertions(+), 113 deletions(-) delete mode 100644 dwarf-error.patch delete mode 100644 dyninst-cmake3.27.patch delete mode 100644 onetbb.patch diff --git a/.gitignore b/.gitignore index 9423139..1299cc7 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ /testsuite-12.2.0.tar.gz /dyninst-12.3.0.tar.gz /testsuite-12.3.0.tar.gz +/dyninst-13.snap.20250123.g80e1adaf.tar.gz diff --git a/dwarf-error.patch b/dwarf-error.patch deleted file mode 100644 index 9efff30..0000000 --- a/dwarf-error.patch +++ /dev/null @@ -1,11 +0,0 @@ -Remove extraneous error messages of the form: - err message: .debug_loclists section missing - err message: invalid DWARF -which are repeated in some circumstances without adding useful context - ---- dyninst-12.1.0/symtabAPI/src/dwarfWalker.C -+++ dyninst-12.1.0/symtabAPI/src/dwarfWalker.C -@@ -1858,1 +1858,1 @@ -- cerr << "err message: " << dwarf_errmsg(dwarf_errno()) << endl; -+ dwarf_printf("(0x%lx) Error while decoding location: %s\n", id(), dwarf_errmsg(dwarf_errno())); - diff --git a/dyninst-cmake3.27.patch b/dyninst-cmake3.27.patch deleted file mode 100644 index c9da62a..0000000 --- a/dyninst-cmake3.27.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up dyninst-12.3.0/cmake/warnings.cmake.cmake3.27 dyninst-12.3.0/cmake/warnings.cmake ---- dyninst-12.3.0/cmake/warnings.cmake.cmake3.27 2023-02-22 14:39:56.000000000 -0700 -+++ dyninst-12.3.0/cmake/warnings.cmake 2023-06-09 19:59:32.831350952 -0600 -@@ -127,6 +127,7 @@ endif() - - if(CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|Clang)$") - include(CheckCXXCompilerFlag) -+ include(CheckCXXSourceCompiles) - foreach(f IN LISTS REQUESTED_WARNING_FLAGS) - string(REGEX REPLACE "[^a-zA-Z0-9]" "_" v "HAS_CPP_FLAG_${f}") - set(CMAKE_REQUIRED_FLAGS "-${f}") diff --git a/dyninst.spec b/dyninst.spec index 0d3ef86..2b22752 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,22 +2,15 @@ Summary: An API for Run-time Code Generation License: LGPL-2.1-or-later AND GPL-3.0-or-later WITH Bison-exception-2.2 AND LicenseRef-Fedora-Public-Domain AND BSD-3-Clause Name: dyninst Group: Development/Libraries -Release: 8%{?dist} +Release: 1%{?dist} URL: http://www.dyninst.org -Version: 12.3.0 +Version: 13.snap.20250123.g80e1adaf ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 -%define __testsuite_version 12.3.0 -Source0: https://github.com/dyninst/dyninst/archive/v%{version}/dyninst-%{version}.tar.gz -Source1: https://github.com/dyninst/testsuite/archive/v%{__testsuite_version}/testsuite-%{__testsuite_version}.tar.gz - -Patch1: dwarf-error.patch -Patch2: onetbb.patch -# Support cmake 3.27 - https://github.com/dyninst/dyninst/pull/1438 -Patch3: dyninst-cmake3.27.patch +Source0: dyninst-13.snap.20250123.g80e1adaf.tar.gz +Patch1: github-pr1880.patch %global dyninst_base dyninst-%{version} -%global testsuite_base testsuite-%{__testsuite_version} BuildRequires: gcc-c++ BuildRequires: elfutils-devel @@ -29,17 +22,11 @@ BuildRequires: cmake BuildRequires: libtirpc-devel BuildRequires: tbb tbb-devel BuildRequires: tex-latex - -# Extra requires just for the testsuite -BuildRequires: gcc-gfortran libxml2-devel BuildRequires: make -# Testsuite files should not provide/require anything -%{?filter_setup: -%filter_provides_in %{_libdir}/dyninst/testsuite/ -%filter_requires_in %{_libdir}/dyninst/testsuite/ -%filter_setup -} +# https://fedoraproject.org/wiki/Changes/Linker_Error_On_Security_Issues +# may impact the RT library +%undefine _hardened_linker_errors %description @@ -72,32 +59,18 @@ dyninst-devel includes the C header files that specify the Dyninst user-space libraries and interfaces. This is required for rebuilding any program that uses Dyninst. -%package testsuite -Summary: Programs for testing Dyninst -Group: Development/System -Requires: dyninst = %{version}-%{release} -Requires: dyninst-devel = %{version}-%{release} -License: BSD-3-Clause AND LGPL-2.1-or-later - - -%description testsuite -dyninst-testsuite includes the test harness and target programs for -making sure that dyninst works properly. - %prep %setup -q -n %{name}-%{version} -c -%setup -q -T -D -a 1 +# %setup -q -T -D -a 1 pushd %{dyninst_base} -%patch -P1 -p1 -b .dwerr -%patch -P2 -p1 -b .onetbb -%patch -P3 -p1 -b .cmake3.27 +%patch -P1 -p1 popd # cotire seems to cause non-deterministic gcc errors # https://bugzilla.redhat.com/show_bug.cgi?id=1420551 -sed -i.cotire -e 's/USE_COTIRE true/USE_COTIRE false/' \ - %{dyninst_base}/cmake/shared.cmake +# sed -i.cotire -e 's/USE_COTIRE true/USE_COTIRE false/' \ +# %{dyninst_base}/cmake/shared.cmake %build @@ -112,50 +85,31 @@ LDFLAGS="$LDFLAGS $RPM_LD_FLAGS" CXXFLAGS="$CFLAGS" export CFLAGS CXXFLAGS LDFLAGS -%cmake \ +%cmake --log-level=DEBUG \ -DENABLE_DEBUGINFOD=1 \ - -DINSTALL_LIB_DIR:PATH=%{_libdir}/dyninst \ - -DINSTALL_INCLUDE_DIR:PATH=%{_includedir}/dyninst \ - -DINSTALL_CMAKE_DIR:PATH=%{_libdir}/cmake/Dyninst \ -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_SKIP_RPATH:BOOL=YES -%cmake_build - -# Hack to install dyninst nearby, so the testsuite can use it -DESTDIR="../install" %__cmake --install "%{__cmake_builddir}" -find ../install -name '*.cmake' -execdir \ - sed -i -e "s!%{_prefix}!$PWD/../install&!" '{}' '+' -# cmake mistakenly looks for libtbb.so in the dyninst install dir -sed -i '/libtbb.so/ s/".*usr/"\/usr/' $PWD/../install%{_libdir}/cmake/Dyninst/commonTargets.cmake - -cd ../%{testsuite_base} -# testsuite build sometimes encounters dependency issues with -jN -%define _smp_mflags -j1 -%cmake \ - -DDyninst_DIR:PATH=$PWD/../install%{_libdir}/cmake/Dyninst \ - -DINSTALL_DIR:PATH=%{_libdir}/dyninst/testsuite \ - -DCMAKE_BUILD_TYPE:STRING=Debug \ - -DCMAKE_SKIP_RPATH:BOOL=YES -%cmake_build + -DCMAKE_SKIP_RPATH:BOOL=YES \ + -DINSTALL_CMAKE_DIR:PATH=/usr/lib64/cmake/Dyninst \ + -DCMAKE_INSTALL_PREFIX:PATH=/usr \ + -DCMAKE_INSTALL_INCLUDEDIR:PATH=/usr/include/dyninst \ + -DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib64/dyninst +%cmake_build -v -v -v %install cd %{dyninst_base} -%cmake_install +%cmake_install -v -v -v -cd ../%{testsuite_base} -%cmake_install +# move /usr/lib64//dyninst/cmake/Dyninst to /usr/lib64/cmake/Dyninst +mkdir -p %{buildroot}/%{_libdir}/cmake +mv %{buildroot}/%{_libdir}/dyninst/cmake/Dyninst %{buildroot}/%{_libdir}/cmake/Dyninst + +# this is a testsuite-like binary, not needed in main package +rm -f "%{buildroot}%{_bindir}/parseThat" mkdir -p %{buildroot}/etc/ld.so.conf.d echo "%{_libdir}/dyninst" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf -# Ugly hack to mask testsuite files from debuginfo extraction. Running the -# testsuite requires debuginfo, so extraction is useless. However, debuginfo -# extraction is still nice for the main libraries, so we don't want to disable -# it package-wide. The permissions are restored by attr(755,-,-) in files. -find %{buildroot}%{_libdir}/dyninst/testsuite/ \ - -type f '!' -name '*.a' -execdir chmod 644 '{}' '+' - %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -187,13 +141,10 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %{_libdir}/dyninst/*.so %{_libdir}/cmake/Dyninst -%files testsuite -%{_bindir}/parseThat -%dir %{_libdir}/dyninst/testsuite/ -%attr(755,root,root) %{_libdir}/dyninst/testsuite/*[!a] -%attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a - %changelog +* Thu Jan 23 2025 Frank Ch. Eigler - 13.snap.20250123.g80e1adaf +- Rebuilt for F42 FTBFS with dyninst git snapshot (temporarily). + * Thu Jan 16 2025 Fedora Release Engineering - 12.3.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild diff --git a/onetbb.patch b/onetbb.patch deleted file mode 100644 index 98eae26..0000000 --- a/onetbb.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- dyninst-12.2.0/cmake/Modules/FindTBB.cmake~ 2023-06-27 22:52:25.396598265 +0100 -+++ dyninst-12.2.0/cmake/Modules/FindTBB.cmake 2023-06-27 22:52:27.776601825 +0100 -@@ -154,7 +154,8 @@ - if(TBB_INCLUDE_DIRS) - # Starting in 2020.1.1, tbb_stddef.h is replaced by version.h - set(_version_files "${TBB_INCLUDE_DIRS}/tbb/tbb_stddef.h" -- "${TBB_INCLUDE_DIRS}/tbb/version.h") -+ "${TBB_INCLUDE_DIRS}/tbb/version.h" -+ "${TBB_INCLUDE_DIRS}/oneapi/tbb/version.h") - foreach(f IN ITEMS ${_version_files}) - if(EXISTS ${f}) - set(_version_file ${f}) diff --git a/sources b/sources index eb53865..2cf21a7 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (dyninst-12.3.0.tar.gz) = 894980c2ce0701c0544877e841e2933a59963eb49ff9b8cde17f67e300d618b77e9fc95f60301a4b8ecaee729010fbab3ec78ef6e2c2fcea118c56d26cb1c3ce -SHA512 (testsuite-12.3.0.tar.gz) = c8d09395cc37ac1ebbd73049e365b703d1fc904d84b73c7749809d8f9dc36ce0b3b842a2fa9e28ba6ffda4e6d2aeb4ca70c2265d3cacc199db3d10c26a12df33 +SHA512 (dyninst-13.snap.20250123.g80e1adaf.tar.gz) = a4896a72f1934b676a0997b4d7b5bd834b677f131c42e5cebf2670ef02dbfe2b09245c80a183c0faaacb0c79b69cc947e445f2655d7355f6913eea330be809a4 From bd527a689eafb76c9f762a64d25a1aa1c92fff27 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Thu, 23 Jan 2025 15:05:18 -0500 Subject: [PATCH 41/55] cont'd --- github-pr1880.patch | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 github-pr1880.patch diff --git a/github-pr1880.patch b/github-pr1880.patch new file mode 100644 index 0000000..c8f8795 --- /dev/null +++ b/github-pr1880.patch @@ -0,0 +1,23 @@ +commit 165402aa1640afb394b11a096b38c6bc3a5bf9d0 (github-fche/patch-1) +gpg: Signature made Wed 22 Jan 2025 03:35:55 PM EST +gpg: using RSA key B5690EEEBB952194 +gpg: Can't check signature: No public key +Author: Frank Ch. Eigler +Date: Wed Jan 22 15:35:55 2025 -0500 + + Update sha1.C: #include + + Subject header is needed on gcc15 to compile sha1.C, supplying declaration of types like uint32_t. + +diff --git a/common/src/sha1.C b/common/src/sha1.C +index 91e9ad291561..d6e76c5727ac 100644 +--- a/common/src/sha1.C ++++ b/common/src/sha1.C +@@ -102,6 +102,7 @@ A million repetitions of "a" + + #include + #include ++#include + + #include "dyntypes.h" + #include "common/src/sha1.h" From 83283f30bb4754aecd38533c9deaa66a9bccbe52 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Thu, 23 Jan 2025 15:48:44 -0500 Subject: [PATCH 42/55] exclude i686 --- dyninst.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dyninst.spec b/dyninst.spec index 2b22752..0db8274 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -5,7 +5,7 @@ Group: Development/Libraries Release: 1%{?dist} URL: http://www.dyninst.org Version: 13.snap.20250123.g80e1adaf -ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 +ExclusiveArch: x86_64 ppc64le aarch64 Source0: dyninst-13.snap.20250123.g80e1adaf.tar.gz Patch1: github-pr1880.patch From a0b8b3efb5883d979e129b5f005ff433ecbafd5f Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Thu, 23 Jan 2025 20:59:46 -0500 Subject: [PATCH 43/55] rebase to 13.0.0 + fedora-cmake patch --- .gitignore | 1 + dyninst.spec | 10 ++++----- github-pr1721.patch | 55 +++++++++++++++++++++++++++++++++++++++++++++ sources | 2 +- 4 files changed, 62 insertions(+), 6 deletions(-) create mode 100644 github-pr1721.patch diff --git a/.gitignore b/.gitignore index 1299cc7..80b3eba 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ /dyninst-12.3.0.tar.gz /testsuite-12.3.0.tar.gz /dyninst-13.snap.20250123.g80e1adaf.tar.gz +/dyninst-13.0.0.tar.gz diff --git a/dyninst.spec b/dyninst.spec index 0db8274..29789d6 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -4,11 +4,11 @@ Name: dyninst Group: Development/Libraries Release: 1%{?dist} URL: http://www.dyninst.org -Version: 13.snap.20250123.g80e1adaf +Version: 13.0.0 ExclusiveArch: x86_64 ppc64le aarch64 -Source0: dyninst-13.snap.20250123.g80e1adaf.tar.gz -Patch1: github-pr1880.patch +Source0: dyninst-13.0.0.tar.gz +Patch1: github-pr1721.patch %global dyninst_base dyninst-%{version} @@ -142,8 +142,8 @@ echo "%{_libdir}/dyninst" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf %{_libdir}/cmake/Dyninst %changelog -* Thu Jan 23 2025 Frank Ch. Eigler - 13.snap.20250123.g80e1adaf -- Rebuilt for F42 FTBFS with dyninst git snapshot (temporarily). +* Thu Jan 23 2025 Frank Ch. Eigler - 13.0.0 +- Rebuilt for F42 FTBFS with 13.0.0 + backported cmake fixes * Thu Jan 16 2025 Fedora Release Engineering - 12.3.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild diff --git a/github-pr1721.patch b/github-pr1721.patch new file mode 100644 index 0000000..3fde0c9 --- /dev/null +++ b/github-pr1721.patch @@ -0,0 +1,55 @@ +commit e70b1001eb5082bb0204b602e3ca1cfccd67fc94 +gpg: Signature made Tue 09 Apr 2024 11:21:17 AM EDT +gpg: using RSA key B5690EEEBB952194 +gpg: Can't check signature: No public key +Author: kupsch +Date: Tue Apr 9 10:21:17 2024 -0500 + + improve cmake install dirs (#1721) + + * Use cmake's GNUInstallDirs to get the lib, bin and include directory + names instead of always using 'lib', 'bin', and 'include'. This + results in two changes to the installation: + + - lib directory becomes 'lib64' on platforms where this is the + convention + + - the lib, bin and include may be overwritten using the cmake + variables CMAKE_INSTALL_BINDIR, CMAKE_INSTALL_LIBDIR and + CMAKE_INSTALL_INCLUDEDIR respectively + + * Update github workflows to handle the lib install dir lib64: + + - use Dyninst_ROOT instead of Dyninst_DIR as it searches for the + directory used + + - for non-cmake uses search for lib* to find either lib or lib64 + +diff --git a/cmake/DyninstLibrarySettings.cmake b/cmake/DyninstLibrarySettings.cmake +index d3627f8789f2..e8cb26b95c39 100644 +--- a/cmake/DyninstLibrarySettings.cmake ++++ b/cmake/DyninstLibrarySettings.cmake +@@ -25,9 +25,10 @@ else() + set(CMAKE_VISIBILITY_INLINES_HIDDEN ON) + endif() + +-set(DYNINST_INSTALL_BINDIR "bin") +-set(DYNINST_INSTALL_LIBDIR "lib") +-set(DYNINST_INSTALL_INCLUDEDIR "include") ++include(GNUInstallDirs) ++set(DYNINST_INSTALL_BINDIR "${CMAKE_INSTALL_BINDIR}") ++set(DYNINST_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}") ++set(DYNINST_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}") + set(DYNINST_INSTALL_CMAKEDIR "${DYNINST_INSTALL_LIBDIR}/cmake/Dyninst") + + # -- Set up the RPATH --- +diff --git a/parseThat/CMakeLists.txt b/parseThat/CMakeLists.txt +index ffe4b7aea29c..d4697a8a1d99 100644 +--- a/parseThat/CMakeLists.txt ++++ b/parseThat/CMakeLists.txt +@@ -29,4 +29,4 @@ target_link_libraries(parseThat PRIVATE dyninstAPI) + target_include_directories(parseThat BEFORE + PRIVATE "$") + +-install(TARGETS parseThat RUNTIME DESTINATION bin) ++install(TARGETS parseThat RUNTIME DESTINATION "${DYNINST_INSTALL_BINDIR}") diff --git a/sources b/sources index 2cf21a7..5cadd84 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (dyninst-13.snap.20250123.g80e1adaf.tar.gz) = a4896a72f1934b676a0997b4d7b5bd834b677f131c42e5cebf2670ef02dbfe2b09245c80a183c0faaacb0c79b69cc947e445f2655d7355f6913eea330be809a4 +SHA512 (dyninst-13.0.0.tar.gz) = efa09018c411f6138e6e2cf6510007b29b00ed9e0d643df702303ee0ccb39b1ea1640bba18555f4cb0a7dbab677362c88ffe0eccace62b57860daee9350a4eee From ba863fce9d2c74eb62434739a68a60ef19a81a7d Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Thu, 23 Jan 2025 21:12:48 -0500 Subject: [PATCH 44/55] Add PR1880 patch too. --- dyninst.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dyninst.spec b/dyninst.spec index 29789d6..eab8acd 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -9,6 +9,7 @@ ExclusiveArch: x86_64 ppc64le aarch64 Source0: dyninst-13.0.0.tar.gz Patch1: github-pr1721.patch +Patch2: github-pr1880.patch %global dyninst_base dyninst-%{version} @@ -65,6 +66,7 @@ that uses Dyninst. pushd %{dyninst_base} %patch -P1 -p1 +%patch -P2 -p1 popd # cotire seems to cause non-deterministic gcc errors From 1a6e35086a366132e878be8e254a3e996bb0b5d1 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Thu, 23 Jan 2025 21:38:27 -0500 Subject: [PATCH 45/55] one more patch --- dyninst.spec | 4 +++- github-pr1880-ish.patch | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 github-pr1880-ish.patch diff --git a/dyninst.spec b/dyninst.spec index eab8acd..3573fdf 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -10,6 +10,7 @@ ExclusiveArch: x86_64 ppc64le aarch64 Source0: dyninst-13.0.0.tar.gz Patch1: github-pr1721.patch Patch2: github-pr1880.patch +Patch3: github-pr1880-ish.patch %global dyninst_base dyninst-%{version} @@ -67,6 +68,7 @@ that uses Dyninst. pushd %{dyninst_base} %patch -P1 -p1 %patch -P2 -p1 +%patch -P3 -p1 popd # cotire seems to cause non-deterministic gcc errors @@ -145,7 +147,7 @@ echo "%{_libdir}/dyninst" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf %changelog * Thu Jan 23 2025 Frank Ch. Eigler - 13.0.0 -- Rebuilt for F42 FTBFS with 13.0.0 + backported cmake fixes +- Rebuilt for F42 FTBFS with 13.0.0 + backported fixes * Thu Jan 16 2025 Fedora Release Engineering - 12.3.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild diff --git a/github-pr1880-ish.patch b/github-pr1880-ish.patch new file mode 100644 index 0000000..5ad67b8 --- /dev/null +++ b/github-pr1880-ish.patch @@ -0,0 +1,12 @@ +diff --git a/common/h/Annotatable.h b/common/h/Annotatable.h +index 6588e3dd36da..262a193ffbb8 100644 +--- a/common/h/Annotatable.h ++++ b/common/h/Annotatable.h +@@ -44,6 +44,7 @@ + #include + #include + #include ++#include + #include "util.h" + #include "compiler_annotations.h" + From 9dde4656ab8cd06e21fefaa06e4034a827b9acba Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Thu, 23 Jan 2025 21:51:33 -0500 Subject: [PATCH 46/55] more cstdint --- github-pr1880-ish.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/github-pr1880-ish.patch b/github-pr1880-ish.patch index 5ad67b8..a6cada4 100644 --- a/github-pr1880-ish.patch +++ b/github-pr1880-ish.patch @@ -10,3 +10,15 @@ index 6588e3dd36da..262a193ffbb8 100644 #include "util.h" #include "compiler_annotations.h" +diff --git a/instructionAPI/h/ArchSpecificFormatters.h b/instructionAPI/h/ArchSpecificFormatters.h +index b32d4cc14e03..145c604f9619 100644 +--- a/instructionAPI/h/ArchSpecificFormatters.h ++++ b/instructionAPI/h/ArchSpecificFormatters.h +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + #include "Architecture.h" + #include "registers/MachRegister.h" + From 05fb71cf62a9e070c7190fa926bddfebeb153aa1 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Fri, 24 Jan 2025 14:08:51 -0500 Subject: [PATCH 47/55] add another cstdint --- github-pr1880-ish.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/github-pr1880-ish.patch b/github-pr1880-ish.patch index a6cada4..77e763f 100644 --- a/github-pr1880-ish.patch +++ b/github-pr1880-ish.patch @@ -22,3 +22,15 @@ index b32d4cc14e03..145c604f9619 100644 #include "Architecture.h" #include "registers/MachRegister.h" +diff --git a/common/src/arch-x86.h b/common/src/arch-x86.h +index ecdc3dc13..7745306d3 100644 +--- a/common/src/arch-x86.h ++++ b/common/src/arch-x86.h +@@ -40,6 +40,7 @@ + #include + #include + #include ++#include + #include "entryIDs.h" + #include "registers/MachRegister.h" + #include "common/src/ia32_locations.h" From 1e4aa1f8f93a66faf65baa457bded259ff54272a Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Fri, 24 Jan 2025 17:20:25 -0500 Subject: [PATCH 48/55] chain-build prep --- dyninst.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dyninst.spec b/dyninst.spec index 3573fdf..176664a 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation License: LGPL-2.1-or-later AND GPL-3.0-or-later WITH Bison-exception-2.2 AND LicenseRef-Fedora-Public-Domain AND BSD-3-Clause Name: dyninst Group: Development/Libraries -Release: 1%{?dist} +Release: 2%{?dist} URL: http://www.dyninst.org Version: 13.0.0 ExclusiveArch: x86_64 ppc64le aarch64 @@ -146,7 +146,7 @@ echo "%{_libdir}/dyninst" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf %{_libdir}/cmake/Dyninst %changelog -* Thu Jan 23 2025 Frank Ch. Eigler - 13.0.0 +* Thu Jan 23 2025 Frank Ch. Eigler - 13.0.0-2 - Rebuilt for F42 FTBFS with 13.0.0 + backported fixes * Thu Jan 16 2025 Fedora Release Engineering - 12.3.0-8 From 6600f8b882c1fe31afd58c5f6e98d6713750e1f6 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Fri, 24 Jan 2025 18:43:11 -0500 Subject: [PATCH 49/55] try with i686++ --- dyninst.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dyninst.spec b/dyninst.spec index 176664a..202db8c 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,10 +2,10 @@ Summary: An API for Run-time Code Generation License: LGPL-2.1-or-later AND GPL-3.0-or-later WITH Bison-exception-2.2 AND LicenseRef-Fedora-Public-Domain AND BSD-3-Clause Name: dyninst Group: Development/Libraries -Release: 2%{?dist} +Release: 3%{?dist} URL: http://www.dyninst.org Version: 13.0.0 -ExclusiveArch: x86_64 ppc64le aarch64 +ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 Source0: dyninst-13.0.0.tar.gz Patch1: github-pr1721.patch @@ -146,7 +146,7 @@ echo "%{_libdir}/dyninst" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf %{_libdir}/cmake/Dyninst %changelog -* Thu Jan 23 2025 Frank Ch. Eigler - 13.0.0-2 +* Thu Jan 23 2025 Frank Ch. Eigler - 13.0.0-3 - Rebuilt for F42 FTBFS with 13.0.0 + backported fixes * Thu Jan 16 2025 Fedora Release Engineering - 12.3.0-8 From e8cdcd672a14ceaf9a12588921cceaa7c4a4c6a9 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Fri, 24 Jan 2025 18:53:01 -0500 Subject: [PATCH 50/55] disable i686 again, ftbfs --- dyninst.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dyninst.spec b/dyninst.spec index 202db8c..44a08f1 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,10 +2,10 @@ Summary: An API for Run-time Code Generation License: LGPL-2.1-or-later AND GPL-3.0-or-later WITH Bison-exception-2.2 AND LicenseRef-Fedora-Public-Domain AND BSD-3-Clause Name: dyninst Group: Development/Libraries -Release: 3%{?dist} +Release: 4%{?dist} URL: http://www.dyninst.org Version: 13.0.0 -ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 +ExclusiveArch: x86_64 ppc64le aarch64 Source0: dyninst-13.0.0.tar.gz Patch1: github-pr1721.patch @@ -146,8 +146,8 @@ echo "%{_libdir}/dyninst" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf %{_libdir}/cmake/Dyninst %changelog -* Thu Jan 23 2025 Frank Ch. Eigler - 13.0.0-3 -- Rebuilt for F42 FTBFS with 13.0.0 + backported fixes +* Thu Jan 23 2025 Frank Ch. Eigler - 13.0.0-4 +- Rebuilt for F42 FTBFS with 13.0.0 + backported fixes + sans i686 * Thu Jan 16 2025 Fedora Release Engineering - 12.3.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 75a479c9cc41f00bf632fee3cfae9f5a97a9bd0a Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Thu, 6 Feb 2025 08:48:17 -0500 Subject: [PATCH 51/55] Backport https://github.com/dyninst/dyninst/issues/1730 for ctor ordering --- dyninst.spec | 7 +- github-pr1730.patch | 151 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 157 insertions(+), 1 deletion(-) create mode 100644 github-pr1730.patch diff --git a/dyninst.spec b/dyninst.spec index 44a08f1..08619a1 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation License: LGPL-2.1-or-later AND GPL-3.0-or-later WITH Bison-exception-2.2 AND LicenseRef-Fedora-Public-Domain AND BSD-3-Clause Name: dyninst Group: Development/Libraries -Release: 4%{?dist} +Release: 5%{?dist} URL: http://www.dyninst.org Version: 13.0.0 ExclusiveArch: x86_64 ppc64le aarch64 @@ -11,6 +11,7 @@ Source0: dyninst-13.0.0.tar.gz Patch1: github-pr1721.patch Patch2: github-pr1880.patch Patch3: github-pr1880-ish.patch +Patch4: github-pr1730.patch %global dyninst_base dyninst-%{version} @@ -69,6 +70,7 @@ pushd %{dyninst_base} %patch -P1 -p1 %patch -P2 -p1 %patch -P3 -p1 +%patch -P4 -p1 popd # cotire seems to cause non-deterministic gcc errors @@ -146,6 +148,9 @@ echo "%{_libdir}/dyninst" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf %{_libdir}/cmake/Dyninst %changelog +* Thu Feb 06 2025 Frank Ch. Eigler - 13.0.0-5 +- Backported github PR/1370 for constructor ordering. + * Thu Jan 23 2025 Frank Ch. Eigler - 13.0.0-4 - Rebuilt for F42 FTBFS with 13.0.0 + backported fixes + sans i686 diff --git a/github-pr1730.patch b/github-pr1730.patch new file mode 100644 index 0000000..72c667e --- /dev/null +++ b/github-pr1730.patch @@ -0,0 +1,151 @@ +commit eae798d4e5f938cb85758571dbab9afbbea7b5d2 (HEAD -> v13.0.0) +Author: Frank Ch. Eigler +Date: Thu Feb 6 08:35:33 2025 -0500 + + MachRegister: fix initialization order bug (#1731) + + Backported upstream commit to 13.0.0 base. + + commit a29f32ac87c4483b97a2c5cb9beed5642124ae8f + Author: Tim Haines + Date: Mon Apr 22 15:32:12 2024 -0500 + + MachRegister: fix initialization order bug (#1731) + + This fixes the static initialization ordering issue reported in https://github.com/dyninst/dyninst/issues/1730. + +diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt +index 669659e44c76..b6507772858c 100644 +--- a/common/CMakeLists.txt ++++ b/common/CMakeLists.txt +@@ -39,7 +39,6 @@ set(_public_headers + h/registers/AMDGPU/amdgpu_gfx90a_regs.h + h/registers/AMDGPU/amdgpu_gfx940_regs.h + h/registers/cuda_regs.h +- h/registers/MachRegister.h + h/registers/ppc32_regs.h + h/registers/ppc64_regs.h + h/registers/reg_def.h +@@ -72,12 +71,12 @@ set(_private_headers + src/lprintf.h + src/lru_cache.h + src/MappedFile.h ++ src/registers/MachRegisterCache.h + src/NodeIterator.h + src/ntHeaders.h + src/parseauxv.h + src/pathName.h + src/pool_allocators.h +- src/registers/MachRegister.C + src/sha1.h + src/singleton_object_pool.h + src/stats.h +@@ -111,6 +110,7 @@ set(_sources + src/debug_common.C + src/VariableLocation.C + src/Buffer.C ++ src/registers/MachRegister.C + src/MachSyscall.C) + + if(DYNINST_OS_UNIX) +diff --git a/common/src/dyn_regs.C b/common/src/dyn_regs.C +index 3fcd194a71dd..7951dbe753bc 100644 +--- a/common/src/dyn_regs.C ++++ b/common/src/dyn_regs.C +@@ -28,8 +28,16 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + ++#include "registers/MachRegisterCache.h" ++ ++namespace Dyninst { namespace registers { ++ // These are used in MachRegister.C ++ name_cache names; ++}} ++ + //clang-format: off + #define DYN_DEFINE_REGS + #include "dyn_regs.h" + #undef DYN_DEFINE_REGS + //clang-format: on ++ +diff --git a/common/src/registers/MachRegister.C b/common/src/registers/MachRegister.C +index ccd01abc1811..93c020c04415 100644 +--- a/common/src/registers/MachRegister.C ++++ b/common/src/registers/MachRegister.C +@@ -1,4 +1,5 @@ + #include "common/h/registers/MachRegister.h" ++#include "registers/MachRegisterCache.h" + #include "debug_common.h" + #include "dyn_regs.h" + #include "external/rose/amdgpuInstructionEnum.h" +@@ -10,17 +11,24 @@ + #include + + namespace { +- std::unordered_map names; + const std::string invalid_reg_name{""}; + } + ++namespace Dyninst { namespace registers { ++ // These are defined in dyn_regs.C to ensure global constructor initialization ordering ++ extern name_cache names; ++ } ++} ++ ++ + namespace Dyninst { + + MachRegister::MachRegister() : reg(0) {} + + MachRegister::MachRegister(signed int r) : reg(r) {} + +- MachRegister::MachRegister(signed int r, std::string n) : reg(r) { names.emplace(r, std::move(n)); } ++ MachRegister::MachRegister(signed int r, std::string n) : reg(r) { ++ registers::names.emplace(r, std::move(n)); } + + unsigned int MachRegister::regClass() const { return reg & 0x00ff0000; } + +@@ -106,8 +114,8 @@ namespace Dyninst { + bool MachRegister::isValid() const { return (reg != InvalidReg.reg); } + + std::string const& MachRegister::name() const { +- auto iter = names.find(reg); +- if(iter != names.end()) { ++ auto iter = registers::names.find(reg); ++ if(iter != registers::names.end()) { + return iter->second; + } + common_parsing_printf("No MachRegister found with value %x\n", static_cast(reg)); +diff --git a/common/src/dyn_regs.C b/common/src/registers/MachRegisterCache.h +similarity index 80% +copy from common/src/dyn_regs.C +copy to common/src/registers/MachRegisterCache.h +index 3fcd194a71dd..2a74bbde821a 100644 +--- a/common/src/dyn_regs.C ++++ b/common/src/registers/MachRegisterCache.h +@@ -28,8 +28,19 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +-//clang-format: off +-#define DYN_DEFINE_REGS +-#include "dyn_regs.h" +-#undef DYN_DEFINE_REGS +-//clang-format: on ++#ifndef DYNINST_COMMON_REGISTERS_MACHREGISTERCACHE_H ++#define DYNINST_COMMON_REGISTERS_MACHREGISTERCACHE_H ++ ++#include "registers/MachRegister.h" ++ ++#include ++#include ++#include ++#include ++ ++namespace Dyninst { namespace registers { ++ typedef std::unordered_map name_cache; ++}} ++ ++ ++#endif From 4d320a0508101d619bcd12444f84628c76d291d6 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Mon, 14 Jul 2025 17:07:51 -0400 Subject: [PATCH 52/55] update .spec to remove deprecated project web site url --- dyninst.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dyninst.spec b/dyninst.spec index 08619a1..accb871 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -3,7 +3,7 @@ License: LGPL-2.1-or-later AND GPL-3.0-or-later WITH Bison-exception-2.2 AND Lic Name: dyninst Group: Development/Libraries Release: 5%{?dist} -URL: http://www.dyninst.org +URL: https://www.paradyn.org Version: 13.0.0 ExclusiveArch: x86_64 ppc64le aarch64 From 1aaacf00c0294dfd61b4350f545002c9437ecafe Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 19:38:49 +0000 Subject: [PATCH 53/55] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- dyninst.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dyninst.spec b/dyninst.spec index accb871..422d402 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation License: LGPL-2.1-or-later AND GPL-3.0-or-later WITH Bison-exception-2.2 AND LicenseRef-Fedora-Public-Domain AND BSD-3-Clause Name: dyninst Group: Development/Libraries -Release: 5%{?dist} +Release: 6%{?dist} URL: https://www.paradyn.org Version: 13.0.0 ExclusiveArch: x86_64 ppc64le aarch64 @@ -148,6 +148,9 @@ echo "%{_libdir}/dyninst" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf %{_libdir}/cmake/Dyninst %changelog +* Wed Jul 23 2025 Fedora Release Engineering - 13.0.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Thu Feb 06 2025 Frank Ch. Eigler - 13.0.0-5 - Backported github PR/1370 for constructor ordering. From 2c3bf3ff72a8f6d9a3971da05d105eff6164cc97 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Wed, 20 Aug 2025 13:21:18 -0600 Subject: [PATCH 54/55] Rebuild for tbb 2022.2.0 --- dyninst.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dyninst.spec b/dyninst.spec index 422d402..774c61c 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation License: LGPL-2.1-or-later AND GPL-3.0-or-later WITH Bison-exception-2.2 AND LicenseRef-Fedora-Public-Domain AND BSD-3-Clause Name: dyninst Group: Development/Libraries -Release: 6%{?dist} +Release: 7%{?dist} URL: https://www.paradyn.org Version: 13.0.0 ExclusiveArch: x86_64 ppc64le aarch64 @@ -148,6 +148,9 @@ echo "%{_libdir}/dyninst" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf %{_libdir}/cmake/Dyninst %changelog +* Wed Aug 20 2025 Jerry James - 13.0.0-7 +- Rebuild for tbb 2022.2.0 + * Wed Jul 23 2025 Fedora Release Engineering - 13.0.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 238a2d5e5957b07951a8b8c84e3e20a2b5b19bfe Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 12 Jan 2026 17:11:49 +0000 Subject: [PATCH 55/55] Rebuilt for Boost 1.90 --- dyninst.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dyninst.spec b/dyninst.spec index 774c61c..833197a 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation License: LGPL-2.1-or-later AND GPL-3.0-or-later WITH Bison-exception-2.2 AND LicenseRef-Fedora-Public-Domain AND BSD-3-Clause Name: dyninst Group: Development/Libraries -Release: 7%{?dist} +Release: 8%{?dist} URL: https://www.paradyn.org Version: 13.0.0 ExclusiveArch: x86_64 ppc64le aarch64 @@ -148,6 +148,9 @@ echo "%{_libdir}/dyninst" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf %{_libdir}/cmake/Dyninst %changelog +* Mon Jan 12 2026 Jonathan Wakely - 13.0.0-8 +- Rebuilt for Boost 1.90 + * Wed Aug 20 2025 Jerry James - 13.0.0-7 - Rebuild for tbb 2022.2.0