Author: quantum Date: Tue Aug 6 14:52:58 2019 New Revision: 368101 URL: http://llvm.org/viewvc/llvm-project?rev=368101&view=rev Log: [WebAssembly] Lower ASan constructor priority on Emscripten
Summary: This change gives Emscripten the ability to use more than one constructor priorities that runs before ASan. By convention, constructor priorites 0-100 are reserved for use by the system. ASan on Emscripten now uses priority 50, leaving plenty of room for use by Emscripten before and after ASan. This change is done in response to: https://github.com/emscripten-core/emscripten/pull/9076#discussion_r310323723 Reviewers: kripken, tlively, aheejin Reviewed By: tlively Subscribers: cfe-commits, dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits Tags: #llvm, #clang Differential Revision: https://reviews.llvm.org/D65684 Added: cfe/trunk/test/CodeGen/asan-constructor.c Added: cfe/trunk/test/CodeGen/asan-constructor.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/asan-constructor.c?rev=368101&view=auto ============================================================================== --- cfe/trunk/test/CodeGen/asan-constructor.c (added) +++ cfe/trunk/test/CodeGen/asan-constructor.c Tue Aug 6 14:52:58 2019 @@ -0,0 +1,5 @@ +// RUN: %clang_cc1 -fsanitize=address -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple wasm32-unknown-emscripten -fsanitize=address -emit-llvm -o - %s | FileCheck %s --check-prefix=EMSCRIPTEN + +// CHECK: @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 1, void ()* @asan.module_ctor, i8* null }] +// EMSCRIPTEN: @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 50, void ()* @asan.module_ctor, i8* null }] _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits