diff --git a/dyninst-11.0.0-nullbuf.patch b/dyninst-11.0.0-nullbuf.patch new file mode 100644 index 0000000..9f7e1de --- /dev/null +++ b/dyninst-11.0.0-nullbuf.patch @@ -0,0 +1,25 @@ +rhbz1991997 + +commit 212576147 (refs/bisect/new) +Author: Xiaozhu Meng +Date: Wed May 26 11:26:28 2021 -0500 + + Skip parsing of blocks whose code buffer is null (#1033) + +--- dyninst-11.0.0/parseAPI/src/Parser.C.orig ++++ dyninst-11.0.0/parseAPI/src/Parser.C +@@ -1703,6 +1703,14 @@ Parser::parse_frame_one_iteration(ParseFrame &frame, bool recursive) { + cur->region()->offset() + cur->region()->length() - curAddr; + const unsigned char* bufferBegin = + (const unsigned char *)(func->region()->getPtrToInstruction(curAddr)); ++ if (bufferBegin == nullptr) { ++ // This can happen if jump table is over-approxiated. ++ // We ignore this block for now, and later the over-approximated block ++ // will be removed. ++ parsing_printf("\taddress %lx in a different region from the funcion entry at %lx, skip parsing\n", curAddr, func->addr()); ++ continue; ++ } ++ + InstructionDecoder dec(bufferBegin,size,frame.codereg->getArch()); + + if (!ahPtr) diff --git a/dyninst.spec b/dyninst.spec index ad3456c..74e855f 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: 11.0.0 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 @@ -13,6 +13,7 @@ Patch1: testsuite-11.0.0-test12.patch Patch2: testsuite-11.0.0-386.patch Patch3: dyninst-11.0.0-dwarf.patch Patch4: dyninst-11.0.0-rosebc.patch +Patch5: dyninst-11.0.0-nullbuf.patch %global dyninst_base dyninst-%{version} %global testsuite_base testsuite-%{version} @@ -85,6 +86,7 @@ popd pushd %{dyninst_base} %patch3 -p1 -b .dwarf %patch4 -p1 -b .rosebc +%patch5 -p1 -b .nullbuf popd # cotire seems to cause non-deterministic gcc errors @@ -189,6 +191,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Tue Aug 10 2021 Stan Cox - 11.0.0-4 +- Related: rhbz1991997 + * Mon Aug 09 2021 Mohan Boddu - 11.0.0-3 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688