Skip to content

Conversation

@frobtech
Copy link
Contributor

Fuchsia does not fully support an x86-32 (i?86-fuchsia) target.
But the x86_64-fuchsia target in -m32 mode is used when building
some kernel / boot-loader related code. This narrow use of an
(effective) i?86-fuchsia target still supports SafeStack using
the same Fuchsia-specific ABI as x86_64-fuchsia.

Fuchsia does not fully support an x86-32 (i?86-fuchsia) target.
But the x86_64-fuchsia target in -m32 mode is used when building
some kernel / boot-loader related code.  This narrow use of an
(effective) i?86-fuchsia target still supports SafeStack using
the same Fuchsia-specific ABI as x86_64-fuchsia.
@frobtech frobtech marked this pull request as ready for review October 28, 2025 20:25
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' labels Oct 28, 2025
@llvmbot
Copy link
Member

llvmbot commented Oct 28, 2025

@llvm/pr-subscribers-clang

@llvm/pr-subscribers-clang-driver

Author: Roland McGrath (frobtech)

Changes

Fuchsia does not fully support an x86-32 (i?86-fuchsia) target.
But the x86_64-fuchsia target in -m32 mode is used when building
some kernel / boot-loader related code. This narrow use of an
(effective) i?86-fuchsia target still supports SafeStack using
the same Fuchsia-specific ABI as x86_64-fuchsia.


Full diff: https://github.com/llvm/llvm-project/pull/165471.diff

2 Files Affected:

  • (modified) clang/lib/Driver/ToolChains/Fuchsia.cpp (+3-1)
  • (modified) clang/test/Driver/fuchsia.c (+5)
diff --git a/clang/lib/Driver/ToolChains/Fuchsia.cpp b/clang/lib/Driver/ToolChains/Fuchsia.cpp
index 31c2f3f7e1be4..507cc03b27513 100644
--- a/clang/lib/Driver/ToolChains/Fuchsia.cpp
+++ b/clang/lib/Driver/ToolChains/Fuchsia.cpp
@@ -483,7 +483,8 @@ SanitizerMask Fuchsia::getSupportedSanitizers() const {
   Res |= SanitizerKind::Leak;
   Res |= SanitizerKind::Scudo;
   Res |= SanitizerKind::Thread;
-  if (getTriple().getArch() == llvm::Triple::x86_64) {
+  if (getTriple().getArch() == llvm::Triple::x86_64 ||
+      getTriple().getArch() == llvm::Triple::x86) {
     Res |= SanitizerKind::SafeStack;
   }
   return Res;
@@ -496,6 +497,7 @@ SanitizerMask Fuchsia::getDefaultSanitizers() const {
   case llvm::Triple::riscv64:
     Res |= SanitizerKind::ShadowCallStack;
     break;
+  case llvm::Triple::x86:
   case llvm::Triple::x86_64:
     Res |= SanitizerKind::SafeStack;
     break;
diff --git a/clang/test/Driver/fuchsia.c b/clang/test/Driver/fuchsia.c
index d0fec18e13a20..99e5018117924 100644
--- a/clang/test/Driver/fuchsia.c
+++ b/clang/test/Driver/fuchsia.c
@@ -130,6 +130,11 @@
 // RUN:     -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
 // RUN:     -fuse-ld=ld \
 // RUN:     | FileCheck %s -check-prefix=CHECK-SAFESTACK
+// RUN: %clang -### %s --target=x86_64-unknown-fuchsia -m32 \
+// RUN:     -fsanitize=safe-stack 2>&1 \
+// RUN:     -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
+// RUN:     -fuse-ld=ld \
+// RUN:     | FileCheck %s -check-prefix=CHECK-SAFESTACK
 // CHECK-SAFESTACK: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-SAFESTACK: "-fsanitize=safe-stack"
 // CHECK-SAFESTACK-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}x86_64-unknown-fuchsia{{/|\\\\}}libclang_rt.safestack.a"

@frobtech frobtech merged commit c25a4a9 into llvm:main Oct 28, 2025
11 of 13 checks passed
@frobtech frobtech deleted the p/clang-x86-fuchsia-safestack branch October 28, 2025 21:02
@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 29, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux-fast running on sanitizer-buildbot3 while building clang at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/169/builds/16472

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 93345 tests, 64 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 
FAIL: MLIR :: Dialect/MemRef/value-bounds-op-interface-impl.mlir (23489 of 93345)
******************** TEST 'MLIR :: Dialect/MemRef/value-bounds-op-interface-impl.mlir' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/mlir-opt /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/MemRef/value-bounds-op-interface-impl.mlir -pass-pipeline='builtin.module(func.func(test-affine-reify-value-bounds))' -verify-diagnostics      -split-input-file | /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/MemRef/value-bounds-op-interface-impl.mlir
# executed command: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/mlir-opt /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/MemRef/value-bounds-op-interface-impl.mlir '-pass-pipeline=builtin.module(func.func(test-affine-reify-value-bounds))' -verify-diagnostics -split-input-file
# .---command stderr------------
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
# | Stack dump:
# | 0.	Program arguments: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/mlir-opt /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/MemRef/value-bounds-op-interface-impl.mlir -pass-pipeline=builtin.module(func.func(test-affine-reify-value-bounds)) -verify-diagnostics -split-input-file
# |  #0 0x00005a6a05fcbff6 ___interceptor_backtrace /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:4530:13
# |  #1 0x00005a6a062593a8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:834:13
# |  #2 0x00005a6a06252b49 llvm::sys::RunSignalHandlers() /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Support/Signals.cpp:0:5
# |  #3 0x00005a6a0625b4be SignalHandler(int, siginfo_t*, void*) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:426:38
# |  #4 0x000070fbf58458d0 (/lib/x86_64-linux-gnu/libc.so.6+0x458d0)
# |  #5 0x000070fbf58a49bc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0xa49bc)
# |  #6 0x000070fbf584579e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4579e)
# |  #7 0x000070fbf58288cd abort (/lib/x86_64-linux-gnu/libc.so.6+0x288cd)
# |  #8 0x00005a6a0604ecdc (/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/mlir-opt+0x134b2cdc)
# |  #9 0x00005a6a0604cb7e __sanitizer::Die() /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:52:5
# | #10 0x00005a6a0602d7db push_back /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common.h:543:7
# | #11 0x00005a6a0602d7db __asan::ScopedInErrorReport::~ScopedInErrorReport() /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/asan/asan_report.cpp:193:29
# | #12 0x00005a6a0602f66d __asan::ReportGenericError(unsigned long, unsigned long, unsigned long, unsigned long, bool, unsigned long, unsigned int, bool) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/asan/asan_report.cpp:536:1
# | #13 0x00005a6a060303b6 __asan_report_load4 /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/asan/asan_rtl.cpp:130:1
# | #14 0x00005a6a1af9b7ea operator[] /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/SmallVector.h:300:5
# | #15 0x00005a6a1af9b7ea populateBoundsForShapedValueDim /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/lib/Dialect/MemRef/IR/ValueBoundsOpInterfaceImpl.cpp:113:43
# | #16 0x00005a6a1af9b7ea mlir::detail::ValueBoundsOpInterfaceInterfaceTraits::FallbackModel<mlir::memref::(anonymous namespace)::CollapseShapeOpInterface>::populateBoundsForShapedValueDim(mlir::detail::ValueBoundsOpInterfaceInterfaceTraits::Concept const*, mlir::Operation*, mlir::Value, long, mlir::ValueBoundsConstraintSet&) /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/mlir/include/mlir/Interfaces/ValueBoundsOpInterface.h.inc:121:49
# | #17 0x00005a6a1b8d84ca populateBoundsForShapedValueDim /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/mlir/include/mlir/Interfaces/ValueBoundsOpInterface.cpp.inc:0:14
# | #18 0x00005a6a1b8d84ca mlir::ValueBoundsConstraintSet::processWorklist() /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp:405:23
# | #19 0x00005a6a1b8d9e55 mlir::ValueBoundsConstraintSet::computeBound(mlir::AffineMap&, llvm::SmallVector<std::__1::pair<mlir::Value, std::__1::optional<long>>, 2u>&, mlir::presburger::BoundType, mlir::ValueBoundsConstraintSet::Variable const&, std::__1::function<bool (mlir::Value, std::__1::optional<long>, mlir::ValueBoundsConstraintSet&)>, bool) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp:0:8
# | #20 0x00005a6a1888b764 mlir::affine::reifyValueBound(mlir::OpBuilder&, mlir::Location, mlir::presburger::BoundType, mlir::ValueBoundsConstraintSet::Variable const&, std::__1::function<bool (mlir::Value, std::__1::optional<long>, mlir::ValueBoundsConstraintSet&)>, bool) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/lib/Dialect/Affine/Transforms/ReifyValueBounds.cpp:26:14
# | #21 0x00005a6a0678f9d6 operator() /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/lib/Dialect/Affine/TestReifyValueBounds.cpp:158:19
# | #22 0x00005a6a0678f9d6 operator() /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/include/mlir/IR/Visitors.h:341:14
# | #23 0x00005a6a0678f9d6 mlir::WalkResult llvm::function_ref<mlir::WalkResult (mlir::Operation*)>::callback_fn<std::__1::enable_if<!llvm::is_one_of<test::ReifyBoundOp, mlir::Operation*, mlir::Region*, mlir::Block*>::value && std::is_same<mlir::WalkResult, mlir::WalkResult>::value, mlir::WalkResult>::type mlir::detail::walk<(mlir::WalkOrder)1, mlir::ForwardIterator, testReifyValueBounds(mlir::FunctionOpInterface, bool, bool)::$_0, test::ReifyBoundOp, mlir::WalkResult>(mlir::Operation*, testReifyValueBounds(mlir::FunctionOpInterface, bool, bool)::$_0&&)::'lambda'(mlir::Operation*)>(long, mlir::Operation*) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:46:12
# | #24 0x00005a6a067833e9 wasInterrupted /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/include/mlir/Support/WalkResult.h:51:40
# | #25 0x00005a6a067833e9 mlir::WalkResult mlir::detail::walk<mlir::ForwardIterator>(mlir::Operation*, llvm::function_ref<mlir::WalkResult (mlir::Operation*)>, mlir::WalkOrder) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/include/mlir/IR/Visitors.h:239:56
Step 10 (stage2/asan_ubsan check) failure: stage2/asan_ubsan check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 93345 tests, 64 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 
FAIL: MLIR :: Dialect/MemRef/value-bounds-op-interface-impl.mlir (23489 of 93345)
******************** TEST 'MLIR :: Dialect/MemRef/value-bounds-op-interface-impl.mlir' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/mlir-opt /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/MemRef/value-bounds-op-interface-impl.mlir -pass-pipeline='builtin.module(func.func(test-affine-reify-value-bounds))' -verify-diagnostics      -split-input-file | /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/MemRef/value-bounds-op-interface-impl.mlir
# executed command: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/mlir-opt /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/MemRef/value-bounds-op-interface-impl.mlir '-pass-pipeline=builtin.module(func.func(test-affine-reify-value-bounds))' -verify-diagnostics -split-input-file
# .---command stderr------------
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
# | Stack dump:
# | 0.	Program arguments: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/mlir-opt /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/MemRef/value-bounds-op-interface-impl.mlir -pass-pipeline=builtin.module(func.func(test-affine-reify-value-bounds)) -verify-diagnostics -split-input-file
# |  #0 0x00005a6a05fcbff6 ___interceptor_backtrace /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:4530:13
# |  #1 0x00005a6a062593a8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:834:13
# |  #2 0x00005a6a06252b49 llvm::sys::RunSignalHandlers() /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Support/Signals.cpp:0:5
# |  #3 0x00005a6a0625b4be SignalHandler(int, siginfo_t*, void*) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:426:38
# |  #4 0x000070fbf58458d0 (/lib/x86_64-linux-gnu/libc.so.6+0x458d0)
# |  #5 0x000070fbf58a49bc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0xa49bc)
# |  #6 0x000070fbf584579e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4579e)
# |  #7 0x000070fbf58288cd abort (/lib/x86_64-linux-gnu/libc.so.6+0x288cd)
# |  #8 0x00005a6a0604ecdc (/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/mlir-opt+0x134b2cdc)
# |  #9 0x00005a6a0604cb7e __sanitizer::Die() /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:52:5
# | #10 0x00005a6a0602d7db push_back /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common.h:543:7
# | #11 0x00005a6a0602d7db __asan::ScopedInErrorReport::~ScopedInErrorReport() /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/asan/asan_report.cpp:193:29
# | #12 0x00005a6a0602f66d __asan::ReportGenericError(unsigned long, unsigned long, unsigned long, unsigned long, bool, unsigned long, unsigned int, bool) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/asan/asan_report.cpp:536:1
# | #13 0x00005a6a060303b6 __asan_report_load4 /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/asan/asan_rtl.cpp:130:1
# | #14 0x00005a6a1af9b7ea operator[] /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/SmallVector.h:300:5
# | #15 0x00005a6a1af9b7ea populateBoundsForShapedValueDim /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/lib/Dialect/MemRef/IR/ValueBoundsOpInterfaceImpl.cpp:113:43
# | #16 0x00005a6a1af9b7ea mlir::detail::ValueBoundsOpInterfaceInterfaceTraits::FallbackModel<mlir::memref::(anonymous namespace)::CollapseShapeOpInterface>::populateBoundsForShapedValueDim(mlir::detail::ValueBoundsOpInterfaceInterfaceTraits::Concept const*, mlir::Operation*, mlir::Value, long, mlir::ValueBoundsConstraintSet&) /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/mlir/include/mlir/Interfaces/ValueBoundsOpInterface.h.inc:121:49
# | #17 0x00005a6a1b8d84ca populateBoundsForShapedValueDim /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/mlir/include/mlir/Interfaces/ValueBoundsOpInterface.cpp.inc:0:14
# | #18 0x00005a6a1b8d84ca mlir::ValueBoundsConstraintSet::processWorklist() /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp:405:23
# | #19 0x00005a6a1b8d9e55 mlir::ValueBoundsConstraintSet::computeBound(mlir::AffineMap&, llvm::SmallVector<std::__1::pair<mlir::Value, std::__1::optional<long>>, 2u>&, mlir::presburger::BoundType, mlir::ValueBoundsConstraintSet::Variable const&, std::__1::function<bool (mlir::Value, std::__1::optional<long>, mlir::ValueBoundsConstraintSet&)>, bool) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp:0:8
# | #20 0x00005a6a1888b764 mlir::affine::reifyValueBound(mlir::OpBuilder&, mlir::Location, mlir::presburger::BoundType, mlir::ValueBoundsConstraintSet::Variable const&, std::__1::function<bool (mlir::Value, std::__1::optional<long>, mlir::ValueBoundsConstraintSet&)>, bool) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/lib/Dialect/Affine/Transforms/ReifyValueBounds.cpp:26:14
# | #21 0x00005a6a0678f9d6 operator() /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/lib/Dialect/Affine/TestReifyValueBounds.cpp:158:19
# | #22 0x00005a6a0678f9d6 operator() /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/include/mlir/IR/Visitors.h:341:14
# | #23 0x00005a6a0678f9d6 mlir::WalkResult llvm::function_ref<mlir::WalkResult (mlir::Operation*)>::callback_fn<std::__1::enable_if<!llvm::is_one_of<test::ReifyBoundOp, mlir::Operation*, mlir::Region*, mlir::Block*>::value && std::is_same<mlir::WalkResult, mlir::WalkResult>::value, mlir::WalkResult>::type mlir::detail::walk<(mlir::WalkOrder)1, mlir::ForwardIterator, testReifyValueBounds(mlir::FunctionOpInterface, bool, bool)::$_0, test::ReifyBoundOp, mlir::WalkResult>(mlir::Operation*, testReifyValueBounds(mlir::FunctionOpInterface, bool, bool)::$_0&&)::'lambda'(mlir::Operation*)>(long, mlir::Operation*) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:46:12
# | #24 0x00005a6a067833e9 wasInterrupted /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/include/mlir/Support/WalkResult.h:51:40
# | #25 0x00005a6a067833e9 mlir::WalkResult mlir::detail::walk<mlir::ForwardIterator>(mlir::Operation*, llvm::function_ref<mlir::WalkResult (mlir::Operation*)>, mlir::WalkOrder) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/include/mlir/IR/Visitors.h:239:56
Step 14 (stage2/msan check) failure: stage2/msan check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 93342 tests, 64 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80..
FAIL: MLIR :: Dialect/MemRef/value-bounds-op-interface-impl.mlir (34680 of 93342)
******************** TEST 'MLIR :: Dialect/MemRef/value-bounds-op-interface-impl.mlir' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/mlir-opt /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/MemRef/value-bounds-op-interface-impl.mlir -pass-pipeline='builtin.module(func.func(test-affine-reify-value-bounds))' -verify-diagnostics      -split-input-file | /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/MemRef/value-bounds-op-interface-impl.mlir
# executed command: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/mlir-opt /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/MemRef/value-bounds-op-interface-impl.mlir '-pass-pipeline=builtin.module(func.func(test-affine-reify-value-bounds))' -verify-diagnostics -split-input-file
# .---command stderr------------
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
# | Stack dump:
# | 0.	Program arguments: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/mlir-opt /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/MemRef/value-bounds-op-interface-impl.mlir -pass-pipeline=builtin.module(func.func(test-affine-reify-value-bounds)) -verify-diagnostics -split-input-file
# |  #0 0x00005fabc063cd32 ___interceptor_backtrace /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/msan/../sanitizer_common/sanitizer_common_interceptors.inc:4530:13
# |  #1 0x00005fabc0777906 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:0:13
# |  #2 0x00005fabc0774e38 llvm::sys::RunSignalHandlers() /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Support/Signals.cpp:0:5
# |  #3 0x00005fabc0778cc7 SignalHandler(int, siginfo_t*, void*) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:426:38
# |  #4 0x00005fabc067097e IsInInterceptorScope /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/msan/msan_interceptors.cpp:78:10
# |  #5 0x00005fabc067097e SignalAction(int, void*, void*) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/msan/msan_interceptors.cpp:1167:3
# |  #6 0x00007e4fc0c458d0 (/lib/x86_64-linux-gnu/libc.so.6+0x458d0)
# |  #7 0x00007e4fc0ca49bc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0xa49bc)
# |  #8 0x00007e4fc0c4579e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4579e)
# |  #9 0x00007e4fc0c288cd abort (/lib/x86_64-linux-gnu/libc.so.6+0x288cd)
# | #10 0x00005fabc05fafbc (/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/mlir-opt+0x8a48fbc)
# | #11 0x00005fabc05f8e5e __sanitizer::Die() /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:52:5
# | #12 0x00005fabc06104a3 (/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/mlir-opt+0x8a5e4a3)
# | #13 0x00005fabc30ca38c llvm::SmallVectorTemplateCommon<long, void>::operator[](unsigned long) const /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/SmallVector.h:300:5
# | #14 0x00005fabcb999c04 __optional_destruct_base<const long &> /home/b/sanitizer-x86_64-linux-fast/build/libcxx_install_msan/include/c++/v1/optional:359:16
# | #15 0x00005fabcb999c04 __optional_destruct_base /home/b/sanitizer-x86_64-linux-fast/build/libcxx_install_msan/include/c++/v1/optional:379:17
# | #16 0x00005fabcb999c04 __optional_destruct_base /home/b/sanitizer-x86_64-linux-fast/build/libcxx_install_msan/include/c++/v1/optional:489:39
# | #17 0x00005fabcb999c04 __optional_destruct_base /home/b/sanitizer-x86_64-linux-fast/build/libcxx_install_msan/include/c++/v1/optional:509:36
# | #18 0x00005fabcb999c04 __optional_destruct_base /home/b/sanitizer-x86_64-linux-fast/build/libcxx_install_msan/include/c++/v1/optional:533:36
# | #19 0x00005fabcb999c04 __optional_destruct_base /home/b/sanitizer-x86_64-linux-fast/build/libcxx_install_msan/include/c++/v1/optional:557:43
# | #20 0x00005fabcb999c04 optional<const long &, 0> /home/b/sanitizer-x86_64-linux-fast/build/libcxx_install_msan/include/c++/v1/optional:731:57
# | #21 0x00005fabcb999c04 populateBoundsForShapedValueDim /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/lib/Dialect/MemRef/IR/ValueBoundsOpInterfaceImpl.cpp:113:43
# | #22 0x00005fabcb999c04 mlir::detail::ValueBoundsOpInterfaceInterfaceTraits::FallbackModel<mlir::memref::(anonymous namespace)::CollapseShapeOpInterface>::populateBoundsForShapedValueDim(mlir::detail::ValueBoundsOpInterfaceInterfaceTraits::Concept const*, mlir::Operation*, mlir::Value, long, mlir::ValueBoundsConstraintSet&) /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/mlir/include/mlir/Interfaces/ValueBoundsOpInterface.h.inc:121:49
# | #23 0x00005fabcbe66cb7 populateBoundsForShapedValueDim /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/mlir/include/mlir/Interfaces/ValueBoundsOpInterface.cpp.inc:0:14
# | #24 0x00005fabcbe66cb7 mlir::ValueBoundsConstraintSet::processWorklist() /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp:405:23
# | #25 0x00005fabcbe6785f mlir::ValueBoundsConstraintSet::computeBound(mlir::AffineMap&, llvm::SmallVector<std::__1::pair<mlir::Value, std::__1::optional<long>>, 2u>&, mlir::presburger::BoundType, mlir::ValueBoundsConstraintSet::Variable const&, std::__1::function<bool (mlir::Value, std::__1::optional<long>, mlir::ValueBoundsConstraintSet&)>, bool) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp:0:8

aokblast pushed a commit to aokblast/llvm-project that referenced this pull request Oct 30, 2025
Fuchsia does not fully support an x86-32 (i?86-fuchsia) target.
But the x86_64-fuchsia target in -m32 mode is used when building
some kernel / boot-loader related code.  This narrow use of an
(effective) i?86-fuchsia target still supports SafeStack using
the same Fuchsia-specific ABI as x86_64-fuchsia.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants