From fdd9f2aef580078ace3bb60afbe1588be3e3e306 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 1 Mar 2020 20:50:46 +0100 Subject: [PATCH 1/3] Revert "Bring back libfuzzer, for some reasons I don't remember I disabled it:" This reverts commit e042e5407dcbfca143e437d147cba36cb64916f7. --- debian/changelog | 13 ++++++++ .../patches/disable-fuzzer-compiler-rt.diff | 31 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 45 insertions(+) create mode 100644 debian/patches/disable-fuzzer-compiler-rt.diff diff --git a/debian/changelog b/debian/changelog index 3bd665a5..fa92b8d8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ llvm-toolchain-10 (1:10.0.0~+rc2-2) unstable; urgency=medium +<<<<<<< [ Sylvestre Ledru ] * Bring back libfuzzer, for some reasons I don't remember I disabled it: @@ -13,6 +14,18 @@ llvm-toolchain-10 (1:10.0.0~+rc2-2) unstable; urgency=medium [ Gianfranco Costamagna ] * Patch to convert old python3 cgi method into the new html one +======= + [ Sylvestre Ledru ] + * Pass -DCOMPILER_RT_USE_LIBCXX=NO to the build system + to bring fuzzer library back + https://bugs.llvm.org/show_bug.cgi?id=41956 + + [ Aurelien Jarno ] + * Also disable hwasan_symbolize on mipsel mips64el riscv64 + + [ Gianfranco Costamagna ] + * Patch to convert old python3 cgi method into the new html one +>>>>>>> -- Sylvestre Ledru Sat, 29 Feb 2020 14:04:22 +0100 diff --git a/debian/patches/disable-fuzzer-compiler-rt.diff b/debian/patches/disable-fuzzer-compiler-rt.diff new file mode 100644 index 00000000..803327a6 --- /dev/null +++ b/debian/patches/disable-fuzzer-compiler-rt.diff @@ -0,0 +1,31 @@ +Index: llvm-toolchain-snapshot_10~+20191215044521+fd7dca98373/compiler-rt/lib/CMakeLists.txt +=================================================================== +--- llvm-toolchain-snapshot_10~+20191215044521+fd7dca98373.orig/compiler-rt/lib/CMakeLists.txt ++++ llvm-toolchain-snapshot_10~+20191215044521+fd7dca98373/compiler-rt/lib/CMakeLists.txt +@@ -56,6 +56,6 @@ if(COMPILER_RT_BUILD_XRAY) + compiler_rt_build_runtime(xray) + endif() + +-if(COMPILER_RT_BUILD_LIBFUZZER) +- compiler_rt_build_runtime(fuzzer) +-endif() ++#if(COMPILER_RT_BUILD_LIBFUZZER) ++# compiler_rt_build_runtime(fuzzer) ++#endif() +Index: llvm-toolchain-snapshot_10~+20191215044521+fd7dca98373/compiler-rt/test/CMakeLists.txt +=================================================================== +--- llvm-toolchain-snapshot_10~+20191215044521+fd7dca98373.orig/compiler-rt/test/CMakeLists.txt ++++ llvm-toolchain-snapshot_10~+20191215044521+fd7dca98373/compiler-rt/test/CMakeLists.txt +@@ -54,9 +54,9 @@ if(COMPILER_RT_CAN_EXECUTE_TESTS) + compiler_rt_test_runtime(sanitizer_common) + + # OpenBSD not supporting asan, cannot run the tests +- if(COMPILER_RT_BUILD_LIBFUZZER AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD" AND NOT ANDROID) +- compiler_rt_test_runtime(fuzzer) +- endif() ++# if(COMPILER_RT_BUILD_LIBFUZZER AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD" AND NOT ANDROID) ++# compiler_rt_test_runtime(fuzzer) ++# endif() + + foreach(sanitizer ${COMPILER_RT_SANITIZERS_TO_BUILD}) + # cfi testing is gated on ubsan diff --git a/debian/patches/series b/debian/patches/series index 234a507e..8aa59fc8 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -133,6 +133,7 @@ workaround-bug-42994-use-linker.diff # bug 939472 #try-to-unbreak-thinlto.diff D67877.patch +disable-fuzzer-compiler-rt.diff no-z3.patch python3-shebang.patch From 9d4d39eef90f5106080ab7f4394a5a4d743cac05 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 1 Mar 2020 20:59:37 +0100 Subject: [PATCH 2/3] Disable libfuzzer on x86 https://bugs.llvm.org/show_bug.cgi?id=43677 FTBFS otherwise --- debian/changelog | 21 ++++------ .../patches/disable-fuzzer-compiler-rt.diff | 41 +++++++++---------- 2 files changed, 28 insertions(+), 34 deletions(-) diff --git a/debian/changelog b/debian/changelog index fa92b8d8..a531eaa0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,13 @@ +llvm-toolchain-10 (1:10.0.0~+rc2-3) unstable; urgency=medium + + * Disable libfuzzer on x86 + https://bugs.llvm.org/show_bug.cgi?id=43677 + FTBFS otherwise + + -- Sylvestre Ledru Sun, 01 Mar 2020 20:59:25 +0100 + llvm-toolchain-10 (1:10.0.0~+rc2-2) unstable; urgency=medium -<<<<<<< [ Sylvestre Ledru ] * Bring back libfuzzer, for some reasons I don't remember I disabled it: @@ -14,18 +21,6 @@ llvm-toolchain-10 (1:10.0.0~+rc2-2) unstable; urgency=medium [ Gianfranco Costamagna ] * Patch to convert old python3 cgi method into the new html one -======= - [ Sylvestre Ledru ] - * Pass -DCOMPILER_RT_USE_LIBCXX=NO to the build system - to bring fuzzer library back - https://bugs.llvm.org/show_bug.cgi?id=41956 - - [ Aurelien Jarno ] - * Also disable hwasan_symbolize on mipsel mips64el riscv64 - - [ Gianfranco Costamagna ] - * Patch to convert old python3 cgi method into the new html one ->>>>>>> -- Sylvestre Ledru Sat, 29 Feb 2020 14:04:22 +0100 diff --git a/debian/patches/disable-fuzzer-compiler-rt.diff b/debian/patches/disable-fuzzer-compiler-rt.diff index 803327a6..4f0c97b3 100644 --- a/debian/patches/disable-fuzzer-compiler-rt.diff +++ b/debian/patches/disable-fuzzer-compiler-rt.diff @@ -1,31 +1,30 @@ -Index: llvm-toolchain-snapshot_10~+20191215044521+fd7dca98373/compiler-rt/lib/CMakeLists.txt +Index: llvm-toolchain-10-10.0.0~+rc2/compiler-rt/lib/CMakeLists.txt =================================================================== ---- llvm-toolchain-snapshot_10~+20191215044521+fd7dca98373.orig/compiler-rt/lib/CMakeLists.txt -+++ llvm-toolchain-snapshot_10~+20191215044521+fd7dca98373/compiler-rt/lib/CMakeLists.txt -@@ -56,6 +56,6 @@ if(COMPILER_RT_BUILD_XRAY) - compiler_rt_build_runtime(xray) +--- llvm-toolchain-10-10.0.0~+rc2.orig/compiler-rt/lib/CMakeLists.txt ++++ llvm-toolchain-10-10.0.0~+rc2/compiler-rt/lib/CMakeLists.txt +@@ -57,5 +57,8 @@ if(COMPILER_RT_BUILD_XRAY) endif() --if(COMPILER_RT_BUILD_LIBFUZZER) + if(COMPILER_RT_BUILD_LIBFUZZER) - compiler_rt_build_runtime(fuzzer) --endif() -+#if(COMPILER_RT_BUILD_LIBFUZZER) -+# compiler_rt_build_runtime(fuzzer) -+#endif() -Index: llvm-toolchain-snapshot_10~+20191215044521+fd7dca98373/compiler-rt/test/CMakeLists.txt ++ if(NOT(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "i386" OR CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "i686")) ++ # Disabled because of https://bugs.llvm.org/show_bug.cgi?id=43677 ++ compiler_rt_build_runtime(fuzzer) ++ endif() + endif() +Index: llvm-toolchain-10-10.0.0~+rc2/compiler-rt/test/CMakeLists.txt =================================================================== ---- llvm-toolchain-snapshot_10~+20191215044521+fd7dca98373.orig/compiler-rt/test/CMakeLists.txt -+++ llvm-toolchain-snapshot_10~+20191215044521+fd7dca98373/compiler-rt/test/CMakeLists.txt -@@ -54,9 +54,9 @@ if(COMPILER_RT_CAN_EXECUTE_TESTS) - compiler_rt_test_runtime(sanitizer_common) +--- llvm-toolchain-10-10.0.0~+rc2.orig/compiler-rt/test/CMakeLists.txt ++++ llvm-toolchain-10-10.0.0~+rc2/compiler-rt/test/CMakeLists.txt +@@ -55,7 +55,10 @@ if(COMPILER_RT_CAN_EXECUTE_TESTS) # OpenBSD not supporting asan, cannot run the tests -- if(COMPILER_RT_BUILD_LIBFUZZER AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD" AND NOT ANDROID) + if(COMPILER_RT_BUILD_LIBFUZZER AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD" AND NOT ANDROID) - compiler_rt_test_runtime(fuzzer) -- endif() -+# if(COMPILER_RT_BUILD_LIBFUZZER AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD" AND NOT ANDROID) -+# compiler_rt_test_runtime(fuzzer) -+# endif() ++ if(NOT(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "i386" OR CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "i686")) ++ # Disabled because of https://bugs.llvm.org/show_bug.cgi?id=43677 ++ compiler_rt_test_runtime(fuzzer) ++ endif() + endif() foreach(sanitizer ${COMPILER_RT_SANITIZERS_TO_BUILD}) - # cfi testing is gated on ubsan From f3272a34943e35628b97e22a7431da660c89bbec Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 1 Mar 2020 21:01:13 +0100 Subject: [PATCH 3/3] rename the patch --- ...zer-compiler-rt.diff => disable-fuzzer-compiler-rt-x86.diff} | 0 debian/patches/series | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename debian/patches/{disable-fuzzer-compiler-rt.diff => disable-fuzzer-compiler-rt-x86.diff} (100%) diff --git a/debian/patches/disable-fuzzer-compiler-rt.diff b/debian/patches/disable-fuzzer-compiler-rt-x86.diff similarity index 100% rename from debian/patches/disable-fuzzer-compiler-rt.diff rename to debian/patches/disable-fuzzer-compiler-rt-x86.diff diff --git a/debian/patches/series b/debian/patches/series index 8aa59fc8..467b2eef 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -133,7 +133,7 @@ workaround-bug-42994-use-linker.diff # bug 939472 #try-to-unbreak-thinlto.diff D67877.patch -disable-fuzzer-compiler-rt.diff +disable-fuzzer-compiler-rt-x86.diff no-z3.patch python3-shebang.patch