Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package llvm16 for openSUSE:Factory checked in at 2023-04-23 22:43:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/llvm16 (Old) and /work/SRC/openSUSE:Factory/.llvm16.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "llvm16" Sun Apr 23 22:43:49 2023 rev:3 rq:1082181 version:16.0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/llvm16/llvm16.changes 2023-04-08 17:39:12.158093765 +0200 +++ /work/SRC/openSUSE:Factory/.llvm16.new.1533/llvm16.changes 2023-04-23 22:44:40.993768883 +0200 @@ -1,0 +2,21 @@ +Fri Apr 21 21:07:38 UTC 2023 - Aaron Puchert <[email protected]> + +- Update to version 16.0.2. + * This release contains bug-fixes for the LLVM 16.0.0 release. + This release is API and ABI compatible with 16.0.0. +- Rebase check-no-llvm-exegesis.patch. +- Rebase llvm-do-not-install-static-libraries.patch. + +------------------------------------------------------------------- +Tue Apr 18 20:40:44 UTC 2023 - Aaron Puchert <[email protected]> + +- Relax requirements for clang-tools to allow installation of older + versions of libclang13 with the -devel package. (boo#1210176) +- Enable ThinLTO for ARM 6/7/8 again. (boo#1178070) + +------------------------------------------------------------------- +Thu Apr 13 04:30:36 UTC 2023 - William Brown <[email protected]> + +- bsc#1210383 - Add aarch64 to lldb platforms + +------------------------------------------------------------------- Old: ---- clang-16.0.1.src.tar.xz clang-16.0.1.src.tar.xz.sig clang-docs-16.0.1.src.tar.xz clang-tools-extra-16.0.1.src.tar.xz clang-tools-extra-16.0.1.src.tar.xz.sig cmake-16.0.1.src.tar.xz cmake-16.0.1.src.tar.xz.sig compiler-rt-16.0.1.src.tar.xz compiler-rt-16.0.1.src.tar.xz.sig libcxx-16.0.1.src.tar.xz libcxx-16.0.1.src.tar.xz.sig libcxxabi-16.0.1.src.tar.xz libcxxabi-16.0.1.src.tar.xz.sig lld-16.0.1.src.tar.xz lld-16.0.1.src.tar.xz.sig lldb-16.0.1.src.tar.xz lldb-16.0.1.src.tar.xz.sig llvm-16.0.1.src.tar.xz llvm-16.0.1.src.tar.xz.sig llvm-docs-16.0.1.src.tar.xz openmp-16.0.1.src.tar.xz openmp-16.0.1.src.tar.xz.sig polly-16.0.1.src.tar.xz polly-16.0.1.src.tar.xz.sig third-party-16.0.1.src.tar.xz third-party-16.0.1.src.tar.xz.sig New: ---- clang-16.0.2.src.tar.xz clang-16.0.2.src.tar.xz.sig clang-docs-16.0.2.src.tar.xz clang-tools-extra-16.0.2.src.tar.xz clang-tools-extra-16.0.2.src.tar.xz.sig cmake-16.0.2.src.tar.xz cmake-16.0.2.src.tar.xz.sig compiler-rt-16.0.2.src.tar.xz compiler-rt-16.0.2.src.tar.xz.sig libcxx-16.0.2.src.tar.xz libcxx-16.0.2.src.tar.xz.sig libcxxabi-16.0.2.src.tar.xz libcxxabi-16.0.2.src.tar.xz.sig lld-16.0.2.src.tar.xz lld-16.0.2.src.tar.xz.sig lldb-16.0.2.src.tar.xz lldb-16.0.2.src.tar.xz.sig llvm-16.0.2.src.tar.xz llvm-16.0.2.src.tar.xz.sig llvm-docs-16.0.2.src.tar.xz openmp-16.0.2.src.tar.xz openmp-16.0.2.src.tar.xz.sig polly-16.0.2.src.tar.xz polly-16.0.2.src.tar.xz.sig third-party-16.0.2.src.tar.xz third-party-16.0.2.src.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ llvm16.spec ++++++ --- /var/tmp/diff_new_pack.OYfDou/_old 2023-04-23 22:44:44.137786648 +0200 +++ /var/tmp/diff_new_pack.OYfDou/_new 2023-04-23 22:44:44.141786670 +0200 @@ -16,14 +16,14 @@ # -%define _relver 16.0.1 +%define _relver 16.0.2 %define _version %_relver%{?_rc:rc%_rc} %define _tagver %_relver%{?_rc:-rc%_rc} %define _minor 16.0 %define _sonum 16 %define _itsme16 1 # Integer version used by update-alternatives -%define _uaver 1601 +%define _uaver 1602 %define _soclang 13 %define _socxx 1 @@ -45,7 +45,7 @@ %bcond_without use_lld %endif -%ifarch x86_64 +%ifarch aarch64 x86_64 %bcond_without lldb %bcond_without lldb_python %else @@ -53,8 +53,7 @@ %bcond_with lldb_python %endif -# Disabled on ARM because it's awfully slow and often times out. (boo#1178070) -%ifarch %{ix86} ppc64le s390x x86_64 +%ifarch %{arm} aarch64 %{ix86} ppc64le s390x x86_64 %bcond_without thin_lto %else %bcond_with thin_lto @@ -522,8 +521,8 @@ Summary: Tools for Clang Group: Development/Languages/C and C++ URL: https://clang-analyzer.llvm.org/ -# Avoid multiple provider errors -Requires: clang%{_sonum} +# Can be used with older versions of Clang. +Requires: /usr/bin/clang # Some binaries used to be in the clang package. Conflicts: clang5 Conflicts: clang6 @@ -744,7 +743,6 @@ Requires(post): update-alternatives Requires(postun):update-alternatives Recommends: python3-lldb%{_sonum} -ExclusiveArch: x86_64 %description -n lldb%{_sonum} LLDB is a next generation, high-performance debugger. It is built as a set ++++++ check-no-llvm-exegesis.patch ++++++ --- /var/tmp/diff_new_pack.OYfDou/_old 2023-04-23 22:44:44.189786942 +0200 +++ /var/tmp/diff_new_pack.OYfDou/_new 2023-04-23 22:44:44.193786964 +0200 @@ -10,16 +10,22 @@ llvm-isel-fuzzer --- a/llvm/test/tools/llvm-exegesis/PowerPC/lit.local.cfg +++ b/llvm/test/tools/llvm-exegesis/PowerPC/lit.local.cfg -@@ -1,3 +1 @@ +@@ -1,6 +1 @@ -if not ('PowerPC' in config.root.targets): - # We need support for PowerPC. - config.unsupported = True +-elif not ('powerpc' in config.root.host_triple): +- # We need to be running on an PPC host. +- config.unsupported = True +config.unsupported = True --- a/llvm/test/tools/llvm-exegesis/X86/lit.local.cfg +++ b/llvm/test/tools/llvm-exegesis/X86/lit.local.cfg -@@ -1,3 +1 @@ +@@ -1,6 +1 @@ -if not ('X86' in config.root.targets): - # We need support for X86. - config.unsupported = True +-elif not ('x86_64' in config.root.host_triple): +- # We need to be running on an X86 host. +- config.unsupported = True +config.unsupported = True ++++++ clang-16.0.1.src.tar.xz -> clang-16.0.2.src.tar.xz ++++++ /work/SRC/openSUSE:Factory/llvm16/clang-16.0.1.src.tar.xz /work/SRC/openSUSE:Factory/.llvm16.new.1533/clang-16.0.2.src.tar.xz differ: char 27, line 1 ++++++ clang-docs-16.0.1.src.tar.xz -> clang-docs-16.0.2.src.tar.xz ++++++ ++++ 2146 lines of diff (skipped) ++++++ clang-tools-extra-16.0.1.src.tar.xz -> clang-tools-extra-16.0.2.src.tar.xz ++++++ ++++++ cmake-16.0.1.src.tar.xz -> cmake-16.0.2.src.tar.xz ++++++ ++++++ compiler-rt-16.0.1.src.tar.xz -> compiler-rt-16.0.2.src.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-16.0.1.src/lib/asan/asan_interceptors.cpp new/compiler-rt-16.0.2.src/lib/asan/asan_interceptors.cpp --- old/compiler-rt-16.0.1.src/lib/asan/asan_interceptors.cpp 2023-04-05 05:36:38.000000000 +0200 +++ new/compiler-rt-16.0.2.src/lib/asan/asan_interceptors.cpp 2023-04-19 03:08:51.000000000 +0200 @@ -257,12 +257,36 @@ PoisonShadow(bottom, ssize, 0); } -INTERCEPTOR(int, getcontext, struct ucontext_t *ucp) { - // API does not requires to have ucp clean, and sets only part of fields. We - // use ucp->uc_stack to unpoison new stack. We prefer to have zeroes then - // uninitialized bytes. - ResetContextStack(ucp); - return REAL(getcontext)(ucp); +INTERCEPTOR(void, makecontext, struct ucontext_t *ucp, void (*func)(), int argc, + ...) { + va_list ap; + uptr args[64]; + // We don't know a better way to forward ... into REAL function. We can + // increase args size if neccecary. + CHECK_LE(argc, ARRAY_SIZE(args)); + internal_memset(args, 0, sizeof(args)); + va_start(ap, argc); + for (int i = 0; i < argc; ++i) args[i] = va_arg(ap, uptr); + va_end(ap); + +# define ENUMERATE_ARRAY_4(start) \ + args[start], args[start + 1], args[start + 2], args[start + 3] +# define ENUMERATE_ARRAY_16(start) \ + ENUMERATE_ARRAY_4(start), ENUMERATE_ARRAY_4(start + 4), \ + ENUMERATE_ARRAY_4(start + 8), ENUMERATE_ARRAY_4(start + 12) +# define ENUMERATE_ARRAY_64() \ + ENUMERATE_ARRAY_16(0), ENUMERATE_ARRAY_16(16), ENUMERATE_ARRAY_16(32), \ + ENUMERATE_ARRAY_16(48) + + REAL(makecontext) + ((struct ucontext_t *)ucp, func, argc, ENUMERATE_ARRAY_64()); + +# undef ENUMERATE_ARRAY_4 +# undef ENUMERATE_ARRAY_16 +# undef ENUMERATE_ARRAY_64 + + // Sign the stack so we can identify it for unpoisoning. + SignContextStack(ucp); } INTERCEPTOR(int, swapcontext, struct ucontext_t *oucp, @@ -279,9 +303,6 @@ ReadContextStack(ucp, &stack, &ssize); ClearShadowMemoryForContextStack(stack, ssize); - // See getcontext interceptor. - ResetContextStack(oucp); - # if __has_attribute(__indirect_return__) && \ (defined(__x86_64__) || defined(__i386__)) int (*real_swapcontext)(struct ucontext_t *, struct ucontext_t *) @@ -658,11 +679,11 @@ // Intecept jump-related functions. ASAN_INTERCEPT_FUNC(longjmp); -#if ASAN_INTERCEPT_SWAPCONTEXT - ASAN_INTERCEPT_FUNC(getcontext); +# if ASAN_INTERCEPT_SWAPCONTEXT ASAN_INTERCEPT_FUNC(swapcontext); -#endif -#if ASAN_INTERCEPT__LONGJMP + ASAN_INTERCEPT_FUNC(makecontext); +# endif +# if ASAN_INTERCEPT__LONGJMP ASAN_INTERCEPT_FUNC(_longjmp); #endif #if ASAN_INTERCEPT___LONGJMP_CHK diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-16.0.1.src/lib/asan/asan_internal.h new/compiler-rt-16.0.2.src/lib/asan/asan_internal.h --- old/compiler-rt-16.0.1.src/lib/asan/asan_internal.h 2023-04-05 05:36:38.000000000 +0200 +++ new/compiler-rt-16.0.2.src/lib/asan/asan_internal.h 2023-04-19 03:08:51.000000000 +0200 @@ -105,8 +105,8 @@ void AsanOnDeadlySignal(int, void *siginfo, void *context); +void SignContextStack(void *context); void ReadContextStack(void *context, uptr *stack, uptr *ssize); -void ResetContextStack(void *context); void StopInitOrderChecking(); // Wrapper for TLS/TSD. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-16.0.1.src/lib/asan/asan_linux.cpp new/compiler-rt-16.0.2.src/lib/asan/asan_linux.cpp --- old/compiler-rt-16.0.1.src/lib/asan/asan_linux.cpp 2023-04-05 05:36:38.000000000 +0200 +++ new/compiler-rt-16.0.2.src/lib/asan/asan_linux.cpp 2023-04-19 03:08:51.000000000 +0200 @@ -15,55 +15,56 @@ #if SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD || \ SANITIZER_SOLARIS -#include "asan_interceptors.h" -#include "asan_internal.h" -#include "asan_premap_shadow.h" -#include "asan_thread.h" -#include "sanitizer_common/sanitizer_flags.h" -#include "sanitizer_common/sanitizer_freebsd.h" -#include "sanitizer_common/sanitizer_libc.h" -#include "sanitizer_common/sanitizer_procmaps.h" - -#include <sys/time.h> -#include <sys/resource.h> -#include <sys/mman.h> -#include <sys/syscall.h> -#include <sys/types.h> -#include <dlfcn.h> -#include <fcntl.h> -#include <limits.h> -#include <pthread.h> -#include <stdio.h> -#include <unistd.h> -#include <unwind.h> - -#if SANITIZER_FREEBSD -#include <sys/link_elf.h> -#endif - -#if SANITIZER_SOLARIS -#include <link.h> -#endif - -#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS -#include <ucontext.h> -extern "C" void* _DYNAMIC; -#elif SANITIZER_NETBSD -#include <link_elf.h> -#include <ucontext.h> +# include <dlfcn.h> +# include <fcntl.h> +# include <limits.h> +# include <pthread.h> +# include <stdio.h> +# include <sys/mman.h> +# include <sys/resource.h> +# include <sys/syscall.h> +# include <sys/time.h> +# include <sys/types.h> +# include <unistd.h> +# include <unwind.h> + +# include "asan_interceptors.h" +# include "asan_internal.h" +# include "asan_premap_shadow.h" +# include "asan_thread.h" +# include "sanitizer_common/sanitizer_flags.h" +# include "sanitizer_common/sanitizer_freebsd.h" +# include "sanitizer_common/sanitizer_hash.h" +# include "sanitizer_common/sanitizer_libc.h" +# include "sanitizer_common/sanitizer_procmaps.h" + +# if SANITIZER_FREEBSD +# include <sys/link_elf.h> +# endif + +# if SANITIZER_SOLARIS +# include <link.h> +# endif + +# if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS +# include <ucontext.h> +extern "C" void *_DYNAMIC; +# elif SANITIZER_NETBSD +# include <link_elf.h> +# include <ucontext.h> extern Elf_Dyn _DYNAMIC; -#else -#include <sys/ucontext.h> -#include <link.h> +# else +# include <link.h> +# include <sys/ucontext.h> extern ElfW(Dyn) _DYNAMIC[]; -#endif +# endif // x86-64 FreeBSD 9.2 and older define 'ucontext_t' incorrectly in // 32-bit mode. -#if SANITIZER_FREEBSD && (SANITIZER_WORDSIZE == 32) && \ - __FreeBSD_version <= 902001 // v9.2 -#define ucontext_t xucontext_t -#endif +# if SANITIZER_FREEBSD && (SANITIZER_WORDSIZE == 32) && \ + __FreeBSD_version <= 902001 // v9.2 +# define ucontext_t xucontext_t +# endif typedef enum { ASAN_RT_VERSION_UNDEFINED = 0, @@ -74,21 +75,21 @@ // FIXME: perhaps also store abi version here? extern "C" { SANITIZER_INTERFACE_ATTRIBUTE -asan_rt_version_t __asan_rt_version; +asan_rt_version_t __asan_rt_version; } namespace __asan { void InitializePlatformInterceptors() {} void InitializePlatformExceptionHandlers() {} -bool IsSystemHeapAddress (uptr addr) { return false; } +bool IsSystemHeapAddress(uptr addr) { return false; } void *AsanDoesNotSupportStaticLinkage() { // This will fail to link with -static. return &_DYNAMIC; } -#if ASAN_PREMAP_SHADOW +# if ASAN_PREMAP_SHADOW uptr FindPremappedShadowStart(uptr shadow_size_bytes) { uptr granularity = GetMmapGranularity(); uptr shadow_start = reinterpret_cast<uptr>(&__asan_shadow); @@ -98,14 +99,14 @@ UnmapFromTo(shadow_start + shadow_size, shadow_start + premap_shadow_size); return shadow_start; } -#endif +# endif uptr FindDynamicShadowStart() { uptr shadow_size_bytes = MemToShadowSize(kHighMemEnd); -#if ASAN_PREMAP_SHADOW +# if ASAN_PREMAP_SHADOW if (!PremapShadowFailed()) return FindPremappedShadowStart(shadow_size_bytes); -#endif +# endif return MapDynamicShadow(shadow_size_bytes, ASAN_SHADOW_SCALE, /*min_shadow_base_alignment*/ 0, kHighMemEnd); @@ -121,11 +122,11 @@ ReleaseMemoryPagesToOS(MemToShadow(p), MemToShadow(p + size)); } -#if SANITIZER_ANDROID +# if SANITIZER_ANDROID // FIXME: should we do anything for Android? void AsanCheckDynamicRTPrereqs() {} void AsanCheckIncompatibleRT() {} -#else +# else static int FindFirstDSOCallback(struct dl_phdr_info *info, size_t size, void *data) { VReport(2, "info->dlpi_name = %s\tinfo->dlpi_addr = %p\n", info->dlpi_name, @@ -154,7 +155,7 @@ static bool IsDynamicRTName(const char *libname) { return internal_strstr(libname, "libclang_rt.asan") || - internal_strstr(libname, "libasan.so"); + internal_strstr(libname, "libasan.so"); } static void ReportIncompatibleRT() { @@ -170,9 +171,10 @@ const char *first_dso_name = nullptr; dl_iterate_phdr(FindFirstDSOCallback, &first_dso_name); if (first_dso_name && first_dso_name[0] && !IsDynamicRTName(first_dso_name)) { - Report("ASan runtime does not come first in initial library list; " - "you should either link runtime to your application or " - "manually preload it with LD_PRELOAD.\n"); + Report( + "ASan runtime does not come first in initial library list; " + "you should either link runtime to your application or " + "manually preload it with LD_PRELOAD.\n"); Die(); } } @@ -190,13 +192,14 @@ // as early as possible, otherwise ASan interceptors could bind to // the functions in dynamic ASan runtime instead of the functions in // system libraries, causing crashes later in ASan initialization. - MemoryMappingLayout proc_maps(/*cache_enabled*/true); + MemoryMappingLayout proc_maps(/*cache_enabled*/ true); char filename[PATH_MAX]; MemoryMappedSegment segment(filename, sizeof(filename)); while (proc_maps.Next(&segment)) { if (IsDynamicRTName(segment.filename)) { - Report("Your application is linked against " - "incompatible ASan runtimes.\n"); + Report( + "Your application is linked against " + "incompatible ASan runtimes.\n"); Die(); } } @@ -206,25 +209,36 @@ } } } -#endif // SANITIZER_ANDROID +# endif // SANITIZER_ANDROID # if ASAN_INTERCEPT_SWAPCONTEXT -void ReadContextStack(void *context, uptr *stack, uptr *ssize) { - ucontext_t *ucp = (ucontext_t*)context; - *stack = (uptr)ucp->uc_stack.ss_sp; - *ssize = ucp->uc_stack.ss_size; +constexpr u32 kAsanContextStackFlagsMagic = 0x51260eea; + +static int HashContextStack(const ucontext_t &ucp) { + MurMur2Hash64Builder hash(kAsanContextStackFlagsMagic); + hash.add(reinterpret_cast<uptr>(ucp.uc_stack.ss_sp)); + hash.add(ucp.uc_stack.ss_size); + return static_cast<int>(hash.get()); } -void ResetContextStack(void *context) { - ucontext_t *ucp = (ucontext_t *)context; - ucp->uc_stack.ss_sp = nullptr; - ucp->uc_stack.ss_size = 0; +void SignContextStack(void *context) { + ucontext_t *ucp = reinterpret_cast<ucontext_t *>(context); + ucp->uc_stack.ss_flags = HashContextStack(*ucp); } -# endif // ASAN_INTERCEPT_SWAPCONTEXT -void *AsanDlSymNext(const char *sym) { - return dlsym(RTLD_NEXT, sym); +void ReadContextStack(void *context, uptr *stack, uptr *ssize) { + const ucontext_t *ucp = reinterpret_cast<const ucontext_t *>(context); + if (HashContextStack(*ucp) == ucp->uc_stack.ss_flags) { + *stack = reinterpret_cast<uptr>(ucp->uc_stack.ss_sp); + *ssize = ucp->uc_stack.ss_size; + return; + } + *stack = 0; + *ssize = 0; } +# endif // ASAN_INTERCEPT_SWAPCONTEXT + +void *AsanDlSymNext(const char *sym) { return dlsym(RTLD_NEXT, sym); } bool HandleDlopenInit() { // Not supported on this platform. @@ -233,7 +247,7 @@ return false; } -} // namespace __asan +} // namespace __asan #endif // SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD || // SANITIZER_SOLARIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-16.0.1.src/test/asan/TestCases/Linux/swapcontext_test.cpp new/compiler-rt-16.0.2.src/test/asan/TestCases/Linux/swapcontext_test.cpp --- old/compiler-rt-16.0.1.src/test/asan/TestCases/Linux/swapcontext_test.cpp 2023-04-05 05:36:38.000000000 +0200 +++ new/compiler-rt-16.0.2.src/test/asan/TestCases/Linux/swapcontext_test.cpp 2023-04-19 03:08:51.000000000 +0200 @@ -1,9 +1,9 @@ // Check that ASan plays well with easy cases of makecontext/swapcontext. -// RUN: %clangxx_asan -O0 %s -o %t && %run %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O2 %s -o %t && %run %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 %s -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O0 %s -o %t && %run %t +// RUN: %clangxx_asan -O3 %s -o %t && %run %t +// RUN: %clangxx_asan -fsanitize-address-use-after-return=never -O0 %s -o %t && %run %t +// RUN: %clangxx_asan -fsanitize-address-use-after-return=never -O3 %s -o %t && %run %t // // This test is too sublte to try on non-x86 arch for now. // Android and musl do not support swapcontext. @@ -20,25 +20,23 @@ const int kStackSize = 1 << 20; -__attribute__((noinline)) -void Throw() { - throw 1; -} +__attribute__((noinline)) void Throw() { throw 1; } -__attribute__((noinline)) -void ThrowAndCatch() { +__attribute__((noinline)) void ThrowAndCatch() { try { Throw(); - } catch(int a) { + } catch (int a) { printf("ThrowAndCatch: %d\n", a); } } -void Child(int mode) { - assert(orig_context.uc_stack.ss_size == 0); - char x[32] = {0}; // Stack gets poisoned. - printf("Child: %p\n", x); - ThrowAndCatch(); // Simulate __asan_handle_no_return(). +void Child(int mode, int a, int b, int c) { + char x[32] = {0}; // Stack gets poisoned. + printf("Child: %d\n", x); + assert(a == 'a'); + assert(b == 'b'); + assert(c == 'c'); + ThrowAndCatch(); // Simulate __asan_handle_no_return(). // (a) Do nothing, just return to parent function. // (b) Jump into the original function. Stack remains poisoned unless we do // something. @@ -53,16 +51,13 @@ int Run(int arg, int mode, char *child_stack) { printf("Child stack: %p\n", child_stack); // Setup child context. - memset(&child_context, 0xff, sizeof(child_context)); getcontext(&child_context); - assert(child_context.uc_stack.ss_size == 0); child_context.uc_stack.ss_sp = child_stack; child_context.uc_stack.ss_size = kStackSize / 2; if (mode == 0) { child_context.uc_link = &orig_context; } - makecontext(&child_context, (void (*)())Child, 1, mode); - memset(&orig_context, 0xff, sizeof(orig_context)); + makecontext(&child_context, (void (*)())Child, 4, mode, 'a', 'b', 'c'); if (swapcontext(&orig_context, &child_context) < 0) { perror("swapcontext"); return 0; @@ -74,24 +69,57 @@ return child_stack[arg]; } +ucontext_t poll_context; +ucontext_t poller_context; + +void Poll() { + swapcontext(&poll_context, &poller_context); + + { + char x = 0; + printf("POLL: %p\n", &x); + } + + swapcontext(&poll_context, &poller_context); +} + +void DoRunPoll(char *poll_stack) { + getcontext(&poll_context); + poll_context.uc_stack.ss_sp = poll_stack; + poll_context.uc_stack.ss_size = kStackSize / 2; + makecontext(&poll_context, Poll, 0); + + getcontext(&poller_context); + + swapcontext(&poller_context, &poll_context); + swapcontext(&poller_context, &poll_context); + + // Touch poll's stack to make sure it's unpoisoned. + for (int i = 0; i < kStackSize; i++) { + poll_stack[i] = i; + } +} + +void RunPoll() { + char *poll_stack = new char[kStackSize]; + + for (size_t i = 0; i < 2; ++i) { + DoRunPoll(poll_stack); + } + + delete[] poll_stack; +} + int main(int argc, char **argv) { char stack[kStackSize + 1]; - // CHECK: WARNING: ASan doesn't fully support makecontext/swapcontext int ret = 0; ret += Run(argc - 1, 0, stack); - printf("Test1 passed\n"); - // CHECK: Test1 passed ret += Run(argc - 1, 1, stack); - printf("Test2 passed\n"); - // CHECK: Test2 passed char *heap = new char[kStackSize + 1]; ret += Run(argc - 1, 0, heap); - printf("Test3 passed\n"); - // CHECK: Test3 passed ret += Run(argc - 1, 1, heap); - printf("Test4 passed\n"); - // CHECK: Test4 passed - delete [] heap; + RunPoll(); + delete[] heap; return ret; } ++++++ libcxx-16.0.1.src.tar.xz -> libcxx-16.0.2.src.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcxx-16.0.1.src/include/__config new/libcxx-16.0.2.src/include/__config --- old/libcxx-16.0.1.src/include/__config 2023-04-05 05:36:38.000000000 +0200 +++ new/libcxx-16.0.2.src/include/__config 2023-04-19 03:08:51.000000000 +0200 @@ -38,7 +38,7 @@ // _LIBCPP_VERSION represents the version of libc++, which matches the version of LLVM. // Given a LLVM release LLVM XX.YY.ZZ (e.g. LLVM 16.0.1 == 16.00.01), _LIBCPP_VERSION is // defined to XXYYZZ. -# define _LIBCPP_VERSION 160001 +# define _LIBCPP_VERSION 160002 # define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y # define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y) ++++++ libcxxabi-16.0.1.src.tar.xz -> libcxxabi-16.0.2.src.tar.xz ++++++ ++++++ lld-16.0.1.src.tar.xz -> lld-16.0.2.src.tar.xz ++++++ ++++++ lldb-16.0.1.src.tar.xz -> lldb-16.0.2.src.tar.xz ++++++ /work/SRC/openSUSE:Factory/llvm16/lldb-16.0.1.src.tar.xz /work/SRC/openSUSE:Factory/.llvm16.new.1533/lldb-16.0.2.src.tar.xz differ: char 27, line 1 ++++++ llvm-16.0.1.src.tar.xz -> llvm-16.0.2.src.tar.xz ++++++ /work/SRC/openSUSE:Factory/llvm16/llvm-16.0.1.src.tar.xz /work/SRC/openSUSE:Factory/.llvm16.new.1533/llvm-16.0.2.src.tar.xz differ: char 27, line 1 ++++++ llvm-do-not-install-static-libraries.patch ++++++ --- /var/tmp/diff_new_pack.OYfDou/_old 2023-04-23 22:44:50.549822877 +0200 +++ /var/tmp/diff_new_pack.OYfDou/_new 2023-04-23 22:44:50.553822899 +0200 @@ -2,10 +2,10 @@ want after installation. By not copying them in the first place we reduce the disk usage during installation. -Index: clang-16.0.1.src/cmake/modules/AddClang.cmake +Index: clang-16.0.2.src/cmake/modules/AddClang.cmake =================================================================== ---- a/clang-16.0.1.src/cmake/modules/AddClang.cmake -+++ b/clang-16.0.1.src/cmake/modules/AddClang.cmake +--- a/clang-16.0.2.src/cmake/modules/AddClang.cmake ++++ b/clang-16.0.2.src/cmake/modules/AddClang.cmake @@ -106,12 +106,15 @@ macro(add_clang_library name) if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ARG_INSTALL_WITH_TOOLCHAIN) @@ -68,10 +68,10 @@ endif() if (ARG_MODULE) set_target_properties(${name} PROPERTIES FOLDER "Loadable modules") -Index: lld-16.0.1.src/cmake/modules/AddLLD.cmake +Index: lld-16.0.2.src/cmake/modules/AddLLD.cmake =================================================================== ---- a/lld-16.0.1.src/cmake/modules/AddLLD.cmake -+++ b/lld-16.0.1.src/cmake/modules/AddLLD.cmake +--- a/lld-16.0.2.src/cmake/modules/AddLLD.cmake ++++ b/lld-16.0.2.src/cmake/modules/AddLLD.cmake @@ -17,13 +17,6 @@ macro(add_lld_library name) if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) @@ -86,10 +86,10 @@ if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES) add_llvm_install_targets(install-${name} DEPENDS ${name} -Index: polly-16.0.1.src/cmake/polly_macros.cmake +Index: polly-16.0.2.src/cmake/polly_macros.cmake =================================================================== ---- a/polly-16.0.1.src/cmake/polly_macros.cmake -+++ b/polly-16.0.1.src/cmake/polly_macros.cmake +--- a/polly-16.0.2.src/cmake/polly_macros.cmake ++++ b/polly-16.0.2.src/cmake/polly_macros.cmake @@ -42,12 +42,14 @@ macro(add_polly_library name) llvm_config(${name} ${LLVM_LINK_COMPONENTS}) endif( LLVM_LINK_COMPONENTS ) @@ -110,10 +110,10 @@ endmacro(add_polly_library) macro(add_polly_loadable_module name) -Index: polly-16.0.1.src/lib/CMakeLists.txt +Index: polly-16.0.2.src/lib/CMakeLists.txt =================================================================== ---- a/polly-16.0.1.src/lib/CMakeLists.txt -+++ b/polly-16.0.1.src/lib/CMakeLists.txt +--- a/polly-16.0.2.src/lib/CMakeLists.txt ++++ b/polly-16.0.2.src/lib/CMakeLists.txt @@ -74,7 +74,7 @@ set_target_properties(PollyCore PROPERTI # It depends on all library it needs, such that with # LLVM_POLLY_LINK_INTO_TOOLS=ON, its dependencies like PollyISL are linked as ++++++ llvm-docs-16.0.1.src.tar.xz -> llvm-docs-16.0.2.src.tar.xz ++++++ /work/SRC/openSUSE:Factory/llvm16/llvm-docs-16.0.1.src.tar.xz /work/SRC/openSUSE:Factory/.llvm16.new.1533/llvm-docs-16.0.2.src.tar.xz differ: char 27, line 1 ++++++ openmp-16.0.1.src.tar.xz -> openmp-16.0.2.src.tar.xz ++++++ ++++++ polly-16.0.1.src.tar.xz -> polly-16.0.2.src.tar.xz ++++++ /work/SRC/openSUSE:Factory/llvm16/polly-16.0.1.src.tar.xz /work/SRC/openSUSE:Factory/.llvm16.new.1533/polly-16.0.2.src.tar.xz differ: char 26, line 1 ++++++ third-party-16.0.1.src.tar.xz -> third-party-16.0.2.src.tar.xz ++++++
