Skip to content

[GlobalISel] Diagnose inline assembly constraint lowering errors #135782

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 7, 2025

Conversation

Pierre-vh
Copy link
Contributor

Instead of printing something to dbgs (which is not visible to all users),
emit a diagnostic like the DAG does. We still crash later because we fail to
select the inline assembly, but at least now users will know why it's crashing.

In a future patch we could also recover from the error like the DAG does, so the
lowering can keep going until it either crashes or gives a different error later.

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Pierre-vh Pierre-vh marked this pull request as ready for review April 15, 2025 12:13
@llvmbot
Copy link
Member

llvmbot commented Apr 15, 2025

@llvm/pr-subscribers-backend-aarch64
@llvm/pr-subscribers-backend-amdgpu

@llvm/pr-subscribers-llvm-globalisel

Author: Pierre van Houtryve (Pierre-vh)

Changes

Instead of printing something to dbgs (which is not visible to all users),
emit a diagnostic like the DAG does. We still crash later because we fail to
select the inline assembly, but at least now users will know why it's crashing.

In a future patch we could also recover from the error like the DAG does, so the
lowering can keep going until it either crashes or gives a different error later.


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

1 Files Affected:

  • (modified) llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp (+42-33)
diff --git a/llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp b/llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp
index 81f25b21a0409..97d665c8fbf94 100644
--- a/llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp
@@ -16,6 +16,7 @@
 #include "llvm/CodeGen/MachineOperand.h"
 #include "llvm/CodeGen/MachineRegisterInfo.h"
 #include "llvm/CodeGen/TargetLowering.h"
+#include "llvm/IR/DiagnosticInfo.h"
 #include "llvm/IR/Module.h"
 
 #define DEBUG_TYPE "inline-asm-lowering"
@@ -212,6 +213,17 @@ static bool buildAnyextOrCopy(Register Dst, Register Src,
   return true;
 }
 
+static bool reportInlineAsmConstraintError(const CallBase &Call,
+                                           const GISelAsmOperandInfo &Info,
+                                           Twine Msg) {
+  LLVMContext &Ctx = Call.getContext();
+  Ctx.diagnose(DiagnosticInfoInlineAsm(
+      Call, "invalid constraint '" + Info.ConstraintCode + "': " + Msg));
+  // TODO(?): Allow selection to continue by recovering/leaving the gMIR in a
+  // good state, like the DAG does.
+  return false;
+}
+
 bool InlineAsmLowering::lowerInlineAsm(
     MachineIRBuilder &MIRBuilder, const CallBase &Call,
     std::function<ArrayRef<Register>(const Value &Val)> GetOrCreateVRegs)
@@ -243,8 +255,8 @@ bool InlineAsmLowering::lowerInlineAsm(
       OpInfo.CallOperandVal = const_cast<Value *>(Call.getArgOperand(ArgNo));
 
       if (isa<BasicBlock>(OpInfo.CallOperandVal)) {
-        LLVM_DEBUG(dbgs() << "Basic block input operands not supported yet\n");
-        return false;
+        return reportInlineAsmConstraintError(
+            Call, OpInfo, "basic block input operands not supported yet");
       }
 
       Type *OpTy = OpInfo.CallOperandVal->getType();
@@ -258,9 +270,8 @@ bool InlineAsmLowering::lowerInlineAsm(
 
       // FIXME: Support aggregate input operands
       if (!OpTy->isSingleValueType()) {
-        LLVM_DEBUG(
-            dbgs() << "Aggregate input operands are not supported yet\n");
-        return false;
+        return reportInlineAsmConstraintError(
+            Call, OpInfo, "aggregate input operands not supported yet");
       }
 
       OpInfo.ConstraintVT =
@@ -344,9 +355,8 @@ bool InlineAsmLowering::lowerInlineAsm(
 
         // Find a register that we can use.
         if (OpInfo.Regs.empty()) {
-          LLVM_DEBUG(dbgs()
-                     << "Couldn't allocate output register for constraint\n");
-          return false;
+          return reportInlineAsmConstraintError(
+              Call, OpInfo, "couldn't allocate output register for constraint");
         }
 
         // Add information to the INLINEASM instruction to know that this
@@ -389,13 +399,14 @@ bool InlineAsmLowering::lowerInlineAsm(
 
         const InlineAsm::Flag MatchedOperandFlag(Inst->getOperand(InstFlagIdx).getImm());
         if (MatchedOperandFlag.isMemKind()) {
-          LLVM_DEBUG(dbgs() << "Matching input constraint to mem operand not "
-                               "supported. This should be target specific.\n");
-          return false;
+          return reportInlineAsmConstraintError(
+              Call, OpInfo,
+              "matching input constraint to mem operand not supported; this "
+              "should be target specific");
         }
         if (!MatchedOperandFlag.isRegDefKind() && !MatchedOperandFlag.isRegDefEarlyClobberKind()) {
-          LLVM_DEBUG(dbgs() << "Unknown matching constraint\n");
-          return false;
+          return reportInlineAsmConstraintError(Call, OpInfo,
+                                                "unknown matching constraint");
         }
 
         // We want to tie input to register in next operand.
@@ -425,9 +436,10 @@ bool InlineAsmLowering::lowerInlineAsm(
 
       if (OpInfo.ConstraintType == TargetLowering::C_Other &&
           OpInfo.isIndirect) {
-        LLVM_DEBUG(dbgs() << "Indirect input operands with unknown constraint "
-                             "not supported yet\n");
-        return false;
+        return reportInlineAsmConstraintError(
+            Call, OpInfo,
+            "indirect input operands with unknown constraint not supported "
+            "yet");
       }
 
       if (OpInfo.ConstraintType == TargetLowering::C_Immediate ||
@@ -437,9 +449,8 @@ bool InlineAsmLowering::lowerInlineAsm(
         if (!lowerAsmOperandForConstraint(OpInfo.CallOperandVal,
                                           OpInfo.ConstraintCode, Ops,
                                           MIRBuilder)) {
-          LLVM_DEBUG(dbgs() << "Don't support constraint: "
-                            << OpInfo.ConstraintCode << " yet\n");
-          return false;
+          return reportInlineAsmConstraintError(Call, OpInfo,
+                                                "unsupported constraint");
         }
 
         assert(Ops.size() > 0 &&
@@ -456,9 +467,9 @@ bool InlineAsmLowering::lowerInlineAsm(
       if (OpInfo.ConstraintType == TargetLowering::C_Memory) {
 
         if (!OpInfo.isIndirect) {
-          LLVM_DEBUG(dbgs()
-                     << "Cannot indirectify memory input operands yet\n");
-          return false;
+          return reportInlineAsmConstraintError(
+              Call, OpInfo,
+              "indirect memory input operands are not supported yet");
         }
 
         assert(OpInfo.isIndirect && "Operand must be indirect to be a mem!");
@@ -482,18 +493,15 @@ bool InlineAsmLowering::lowerInlineAsm(
              "Unknown constraint type!");
 
       if (OpInfo.isIndirect) {
-        LLVM_DEBUG(dbgs() << "Can't handle indirect register inputs yet "
-                             "for constraint '"
-                          << OpInfo.ConstraintCode << "'\n");
-        return false;
+        return reportInlineAsmConstraintError(
+            Call, OpInfo, "indirect register inputs are not supported yet");
       }
 
       // Copy the input into the appropriate registers.
       if (OpInfo.Regs.empty()) {
-        LLVM_DEBUG(
-            dbgs()
-            << "Couldn't allocate input register for register constraint\n");
-        return false;
+        return reportInlineAsmConstraintError(
+            Call, OpInfo,
+            "couldn't allocate input register for register constraint");
       }
 
       unsigned NumRegs = OpInfo.Regs.size();
@@ -503,9 +511,10 @@ bool InlineAsmLowering::lowerInlineAsm(
              "source registers");
 
       if (NumRegs > 1) {
-        LLVM_DEBUG(dbgs() << "Input operands with multiple input registers are "
-                             "not supported yet\n");
-        return false;
+        return reportInlineAsmConstraintError(
+            Call, OpInfo,
+            "input operands with multiple input registers are not supported "
+            "yet");
       }
 
       InlineAsm::Flag Flag(InlineAsm::Kind::RegUse, NumRegs);

Copy link
Contributor

@arsenm arsenm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs tests

Comment on lines 222 to 223
// TODO(?): Allow selection to continue by recovering/leaving the gMIR in a
// good state, like the DAG does.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this needs to be done

@Pierre-vh
Copy link
Contributor Author

Needs tests

Until we have some form of error recovery testing will be difficult because the compiler crashes on failure
Do I need to add the recovery in this patch too?

@arsenm
Copy link
Contributor

arsenm commented Apr 23, 2025

Until we have some form of error recovery testing will be difficult because the compiler crashes on failure

It certainly should not crash

@Pierre-vh
Copy link
Contributor Author

Until we have some form of error recovery testing will be difficult because the compiler crashes on failure

It certainly should not crash

I just realized it doesn't have to crash, I can just enable the fallback path.
If I recover here, it "hides" the lowering failure away and we can't use the fallback path. I think recovery needs to be dependent on whether the fallback path is used or not, would that make sense?

And for recovery, I'm thinking of just using buildUndef on all dest registers. The inputs won't be handled though.

@Pierre-vh Pierre-vh force-pushed the users/pierre-vh/gisel-inlineasm-constraint-diag branch from 18fddac to 2a3f542 Compare April 25, 2025 08:32
@Pierre-vh
Copy link
Contributor Author

I added some tests, do you want me to test every message?
It might be difficult because a few situations crash the DAG as well, they're cases that are unsupported in general

@Pierre-vh Pierre-vh requested a review from arsenm April 25, 2025 08:33
Comment on lines 238 to 239
Call, "invalid constraint '" + Info.ConstraintCode + "' in '" +
MF.getName() + "': " + Msg));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid using getName, it's broken for anonymous functions. The context should be reported by the caller based on the context instructions, you shouldn't need to include it here

@arsenm
Copy link
Contributor

arsenm commented Apr 25, 2025

I added some tests, do you want me to test every message?

Comprehensive tests are always best

It might be difficult because a few situations crash the DAG as well, they're cases that are unsupported in general

Should fix those too

Copy link

github-actions bot commented Apr 28, 2025

✅ With the latest revision this PR passed the undef deprecator.

Pierre-vh added 6 commits May 7, 2025 10:31
Instead of printing something to dbgs (which is not visible to all users),
emit a diagnostic like the DAG does. We still crash later because we fail to
select the inline assembly, but at least now users will know why it's crashing.

In a future patch we could also recover from the error like the DAG does, so the
lowering can keep going until it either crashes or gives a different error later.
@Pierre-vh Pierre-vh force-pushed the users/pierre-vh/gisel-inlineasm-constraint-diag branch from b9c9e1e to ef0316a Compare May 7, 2025 09:50
@Pierre-vh
Copy link
Contributor Author

I had to update some tests. Is this still good to land?

Copy link
Contributor Author

Pierre-vh commented May 7, 2025

Merge activity

  • May 7, 8:12 AM EDT: A user started a stack merge that includes this pull request via Graphite.
  • May 7, 8:13 AM EDT: @Pierre-vh merged this pull request with Graphite.

@Pierre-vh Pierre-vh merged commit c22081c into main May 7, 2025
9 of 11 checks passed
@Pierre-vh Pierre-vh deleted the users/pierre-vh/gisel-inlineasm-constraint-diag branch May 7, 2025 12:13
@llvm-ci
Copy link
Collaborator

llvm-ci commented May 7, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-aarch64-linux running on sanitizer-buildbot8 while building llvm at step 2 "annotate".

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

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)
...
-- Configuring done (17.0s)
-- Generating done (0.1s)
CMake Warning:
  Manually-specified variables were not used by the project:

    LIBCXX_HAS_GCC_S_LIB


-- Build files have been written to: /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/msan/libcxx_msan_aarch64/build
[78/186] Generating ScudoUnitTestsObjects.wrappers_cpp_test.cpp.aarch64.o
FAILED: compiler-rt/lib/scudo/standalone/tests/ScudoUnitTestsObjects.wrappers_cpp_test.cpp.aarch64.o /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/scudo/standalone/tests/ScudoUnitTestsObjects.wrappers_cpp_test.cpp.aarch64.o 
cd /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/scudo/standalone/tests && /home/b/sanitizer-aarch64-linux/build/build_default/./bin/clang++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Werror -Wno-unused-parameter -Wno-unknown-warning-option -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/include -g -Wno-covered-switch-default -Wno-suggest-override -DGTEST_NO_LLVM_SUPPORT=1 -DGTEST_HAS_RTTI=0 -I/home/b/sanitizer-aarch64-linux/build/llvm-project/runtimes/../third-party/unittest/googletest/include -I/home/b/sanitizer-aarch64-linux/build/llvm-project/runtimes/../third-party/unittest/googletest -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/include -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/scudo/standalone -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/scudo/standalone/include -DGTEST_HAS_RTTI=0 -g -Wconversion -Wno-mismatched-new-delete -DGWP_ASAN_HOOKS -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Werror=thread-safety -march=armv8-a -c -o ScudoUnitTestsObjects.wrappers_cpp_test.cpp.aarch64.o /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp
/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp:252:22: error: invalid constraint 'm': indirect memory input operands are not supported yet
  252 |         asm volatile("" : : "r,m"(P) : "memory");
      |                      ^
/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp:236:24: error: invalid constraint 'm': indirect memory input operands are not supported yet
  236 |           asm volatile("" : : "r,m"(P) : "memory");
      |                        ^
2 errors generated.
[141/186] Generating ASAN_INST_TEST_OBJECTS.gtest-all.cc.aarch64-inline.o
ninja: build stopped: subcommand failed.
FAILED: runtimes/CMakeFiles/check-compiler-rt /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/CMakeFiles/check-compiler-rt 
cd /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins && /usr/bin/cmake --build /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/ --target check-compiler-rt --config Release
ninja: build stopped: subcommand failed.

How to reproduce locally: https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild


@@@STEP_FAILURE@@@

@@@STEP_FAILURE@@@

@@@STEP_FAILURE@@@
@@@BUILD_STEP build compiler-rt debug@@@
+ /usr/bin/cmake -B build_default -DLLVM_APPEND_VC_REV=OFF -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_CCACHE_BUILD=ON -DLLVM_USE_LINKER=lld -DLLVM_BINUTILS_INCDIR=/usr/include '-DLLVM_ENABLE_PROJECTS=clang;lld' '-DLLVM_ENABLE_RUNTIMES=libcxx;libcxxabi;compiler-rt;libunwind' -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_C_COMPILER=/home/b/sanitizer-aarch64-linux/build/llvm_build0/bin/clang -DCMAKE_CXX_COMPILER=/home/b/sanitizer-aarch64-linux/build/llvm_build0/bin/clang++ -DLLVM_ENABLE_WERROR=ON -DCOMPILER_RT_DEBUG=ON /home/b/sanitizer-aarch64-linux/build/llvm-project/llvm
-- The C compiler identification is Clang 20.1.4
-- The CXX compiler identification is Clang 20.1.4
-- The ASM compiler identification is Clang with GNU-like command-line
-- Found assembler: /home/b/sanitizer-aarch64-linux/build/llvm_build0/bin/clang
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/b/sanitizer-aarch64-linux/build/llvm_build0/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/b/sanitizer-aarch64-linux/build/llvm_build0/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Step 9 (test compiler-rt symbolizer) failure: test compiler-rt symbolizer (failure)
...
-- Performing Test CXX_SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG
-- Performing Test CXX_SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG - Success
-- Configuring done (17.0s)
-- Generating done (0.1s)
CMake Warning:
  Manually-specified variables were not used by the project:

    LIBCXX_HAS_GCC_S_LIB
-- Build files have been written to: /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/msan/libcxx_msan_aarch64/build
[78/186] Generating ScudoUnitTestsObjects.wrappers_cpp_test.cpp.aarch64.o
FAILED: compiler-rt/lib/scudo/standalone/tests/ScudoUnitTestsObjects.wrappers_cpp_test.cpp.aarch64.o /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/scudo/standalone/tests/ScudoUnitTestsObjects.wrappers_cpp_test.cpp.aarch64.o 
cd /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/scudo/standalone/tests && /home/b/sanitizer-aarch64-linux/build/build_default/./bin/clang++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Werror -Wno-unused-parameter -Wno-unknown-warning-option -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/include -g -Wno-covered-switch-default -Wno-suggest-override -DGTEST_NO_LLVM_SUPPORT=1 -DGTEST_HAS_RTTI=0 -I/home/b/sanitizer-aarch64-linux/build/llvm-project/runtimes/../third-party/unittest/googletest/include -I/home/b/sanitizer-aarch64-linux/build/llvm-project/runtimes/../third-party/unittest/googletest -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/include -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/scudo/standalone -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/scudo/standalone/include -DGTEST_HAS_RTTI=0 -g -Wconversion -Wno-mismatched-new-delete -DGWP_ASAN_HOOKS -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Werror=thread-safety -march=armv8-a -c -o ScudoUnitTestsObjects.wrappers_cpp_test.cpp.aarch64.o /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp
/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp:252:22: error: invalid constraint 'm': indirect memory input operands are not supported yet
  252 |         asm volatile("" : : "r,m"(P) : "memory");
      |                      ^
/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp:236:24: error: invalid constraint 'm': indirect memory input operands are not supported yet
  236 |           asm volatile("" : : "r,m"(P) : "memory");
      |                        ^
2 errors generated.
[141/186] Generating ASAN_INST_TEST_OBJECTS.gtest-all.cc.aarch64-inline.o
ninja: build stopped: subcommand failed.
FAILED: runtimes/CMakeFiles/check-compiler-rt /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/CMakeFiles/check-compiler-rt 
cd /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins && /usr/bin/cmake --build /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/ --target check-compiler-rt --config Release
ninja: build stopped: subcommand failed.

How to reproduce locally: https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild




Step 11 (test compiler-rt debug) failure: test compiler-rt debug (failure)
...
-- Performing Test CXX_SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG
-- Performing Test CXX_SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG - Success
-- Configuring done (4.1s)
-- Generating done (0.0s)
CMake Warning:
  Manually-specified variables were not used by the project:

    LIBCXX_HAS_GCC_S_LIB
-- Build files have been written to: /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/msan/libcxx_msan_aarch64/build
[81/186] Generating ScudoUnitTestsObjects.wrappers_cpp_test.cpp.aarch64.o
FAILED: compiler-rt/lib/scudo/standalone/tests/ScudoUnitTestsObjects.wrappers_cpp_test.cpp.aarch64.o /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/scudo/standalone/tests/ScudoUnitTestsObjects.wrappers_cpp_test.cpp.aarch64.o 
cd /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/scudo/standalone/tests && /home/b/sanitizer-aarch64-linux/build/build_default/./bin/clang++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Werror -Wno-unused-parameter -Wno-unknown-warning-option -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/include -g -DSANITIZER_DEBUG=1 -Wno-covered-switch-default -Wno-suggest-override -DGTEST_NO_LLVM_SUPPORT=1 -DGTEST_HAS_RTTI=0 -I/home/b/sanitizer-aarch64-linux/build/llvm-project/runtimes/../third-party/unittest/googletest/include -I/home/b/sanitizer-aarch64-linux/build/llvm-project/runtimes/../third-party/unittest/googletest -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/include -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/scudo/standalone -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/scudo/standalone/include -DGTEST_HAS_RTTI=0 -g -Wconversion -Wno-mismatched-new-delete -DSCUDO_DEBUG=1 -DSCUDO_ENABLE_HOOKS=1 -DSCUDO_ENABLE_HOOKS_TESTS=1 -DGWP_ASAN_HOOKS -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Werror=thread-safety -march=armv8-a -c -o ScudoUnitTestsObjects.wrappers_cpp_test.cpp.aarch64.o /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp
/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp:252:22: error: invalid constraint 'm': indirect memory input operands are not supported yet
  252 |         asm volatile("" : : "r,m"(P) : "memory");
      |                      ^
/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp:236:24: error: invalid constraint 'm': indirect memory input operands are not supported yet
  236 |           asm volatile("" : : "r,m"(P) : "memory");
      |                        ^
2 errors generated.
[129/186] Generating ScudoUnitTestsObjects.combined_test.cpp.aarch64.o
[131/186] Generating ASAN_INST_TEST_OBJECTS.asan_test.cpp.aarch64-calls.o
[132/186] Generating ASAN_INST_TEST_OBJECTS.asan_test.cpp.aarch64-inline.o
[133/186] Generating ASAN_NOINST_TEST_OBJECTS.gtest-all.cc.aarch64-inline.o
[134/186] Generating ASAN_NOINST_TEST_OBJECTS.gtest-all.cc.aarch64-calls.o
[135/186] Generating RtsanNoInstTestObjects.gtest-all.cc.aarch64.o
[136/186] Generating GwpAsanTestObjects.gtest-all.cc.aarch64.o
[137/186] Generating RtsanTestObjects_FileOffset64.gtest-all.cc.aarch64.o
[138/186] Generating RtsanTestObjects.gtest-all.cc.aarch64.o
[139/186] Generating RtsanTestObjects_FileOffset64.rtsan_test_interceptors_posix.cpp.aarch64.o
[140/186] Generating ASAN_INST_TEST_OBJECTS.gtest-all.cc.aarch64-calls.o
[141/186] Generating RtsanTestObjects.rtsan_test_interceptors_posix.cpp.aarch64.o
[142/186] Generating ASAN_INST_TEST_OBJECTS.gtest-all.cc.aarch64-inline.o
ninja: build stopped: subcommand failed.
FAILED: runtimes/CMakeFiles/check-compiler-rt /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/CMakeFiles/check-compiler-rt 
cd /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins && /usr/bin/cmake --build /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/ --target check-compiler-rt --config Release
ninja: build stopped: subcommand failed.

How to reproduce locally: https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild




Step 14 (test compiler-rt default) failure: test compiler-rt default (failure)
...
-- Performing Test CXX_SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG
-- Performing Test CXX_SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG - Success
-- Configuring done (11.6s)
-- Generating done (0.0s)
CMake Warning:
  Manually-specified variables were not used by the project:

    LIBCXX_HAS_GCC_S_LIB
-- Build files have been written to: /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/msan/libcxx_msan_aarch64/build
[72/186] Generating ScudoUnitTestsObjects.wrappers_cpp_test.cpp.aarch64.o
FAILED: compiler-rt/lib/scudo/standalone/tests/ScudoUnitTestsObjects.wrappers_cpp_test.cpp.aarch64.o /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/scudo/standalone/tests/ScudoUnitTestsObjects.wrappers_cpp_test.cpp.aarch64.o 
cd /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/scudo/standalone/tests && /home/b/sanitizer-aarch64-linux/build/build_default/./bin/clang++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Werror -Wno-unused-parameter -Wno-unknown-warning-option -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/include -g -Wno-covered-switch-default -Wno-suggest-override -DGTEST_NO_LLVM_SUPPORT=1 -DGTEST_HAS_RTTI=0 -I/home/b/sanitizer-aarch64-linux/build/llvm-project/runtimes/../third-party/unittest/googletest/include -I/home/b/sanitizer-aarch64-linux/build/llvm-project/runtimes/../third-party/unittest/googletest -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/include -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/scudo/standalone -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/scudo/standalone/include -DGTEST_HAS_RTTI=0 -g -Wconversion -Wno-mismatched-new-delete -DGWP_ASAN_HOOKS -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Werror=thread-safety -march=armv8-a -c -o ScudoUnitTestsObjects.wrappers_cpp_test.cpp.aarch64.o /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp
/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp:252:22: error: invalid constraint 'm': indirect memory input operands are not supported yet
  252 |         asm volatile("" : : "r,m"(P) : "memory");
      |                      ^
/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp:236:24: error: invalid constraint 'm': indirect memory input operands are not supported yet
  236 |           asm volatile("" : : "r,m"(P) : "memory");
      |                        ^
2 errors generated.
[131/186] Generating ScudoUnitTestsObjects.combined_test.cpp.aarch64.o
[133/186] Generating ASAN_NOINST_TEST_OBJECTS.gtest-all.cc.aarch64-calls.o
[134/186] Generating ASAN_INST_TEST_OBJECTS.gtest-all.cc.aarch64-calls.o
[135/186] Generating GwpAsanTestObjects.gtest-all.cc.aarch64.o
[136/186] Generating RtsanTestObjects.gtest-all.cc.aarch64.o
[137/186] Generating RtsanTestObjects.rtsan_test_interceptors_posix.cpp.aarch64.o
[138/186] Generating ASAN_NOINST_TEST_OBJECTS.gtest-all.cc.aarch64-inline.o
[139/186] Generating RtsanTestObjects_FileOffset64.rtsan_test_interceptors_posix.cpp.aarch64.o
[140/186] Generating RtsanTestObjects_FileOffset64.gtest-all.cc.aarch64.o
[141/186] Generating ASAN_INST_TEST_OBJECTS.gtest-all.cc.aarch64-inline.o
[142/186] Generating RtsanNoInstTestObjects.gtest-all.cc.aarch64.o
ninja: build stopped: subcommand failed.
FAILED: runtimes/CMakeFiles/check-compiler-rt /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/CMakeFiles/check-compiler-rt 
cd /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins && /usr/bin/cmake --build /home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/ --target check-compiler-rt --config Release
ninja: build stopped: subcommand failed.

How to reproduce locally: https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild




Step 16 (test standalone compiler-rt) failure: test standalone compiler-rt (failure)
...
-- Looking for __atomic_fetch_add_8 in atomic
-- Looking for __atomic_fetch_add_8 in atomic - found
-- Performing Test CXX_SUPPORTS_FALIGNED_ALLOCATION_FLAG
-- Performing Test CXX_SUPPORTS_FALIGNED_ALLOCATION_FLAG - Success
-- Performing Test CXX_SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG
-- Performing Test CXX_SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG - Success
-- Configuring done (11.6s)
-- Generating done (0.1s)
-- Build files have been written to: /home/b/sanitizer-aarch64-linux/build/compiler_rt_build/lib/msan/libcxx_msan_aarch64/build
[81/161] Generating ScudoUnitTestsObjects.wrappers_cpp_test.cpp.aarch64.o
FAILED: lib/scudo/standalone/tests/ScudoUnitTestsObjects.wrappers_cpp_test.cpp.aarch64.o /home/b/sanitizer-aarch64-linux/build/compiler_rt_build/lib/scudo/standalone/tests/ScudoUnitTestsObjects.wrappers_cpp_test.cpp.aarch64.o 
cd /home/b/sanitizer-aarch64-linux/build/compiler_rt_build/lib/scudo/standalone/tests && /home/b/sanitizer-aarch64-linux/build/build_default/bin/clang++ -Wall -Werror -Wno-unused-parameter -Wno-unknown-warning-option -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/include -g -Wno-covered-switch-default -Wno-suggest-override -DGTEST_NO_LLVM_SUPPORT=1 -DGTEST_HAS_RTTI=0 -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/../third-party/unittest/googletest/include -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/../third-party/unittest/googletest -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/include -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/scudo/standalone -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/scudo/standalone/include -DGTEST_HAS_RTTI=0 -g -Wconversion -Wno-mismatched-new-delete -DGWP_ASAN_HOOKS -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Werror=thread-safety -march=armv8-a -c -o ScudoUnitTestsObjects.wrappers_cpp_test.cpp.aarch64.o /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp
/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp:252:22: error: invalid constraint 'm': indirect memory input operands are not supported yet
  252 |         asm volatile("" : : "r,m"(P) : "memory");
      |                      ^
/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp:236:24: error: invalid constraint 'm': indirect memory input operands are not supported yet
  236 |           asm volatile("" : : "r,m"(P) : "memory");
      |                        ^
2 errors generated.
[113/161] Generating ASAN_NOINST_TEST_OBJECTS.gtest-all.cc.aarch64-inline.o
[115/161] Generating ASAN_INST_TEST_OBJECTS.gtest-all.cc.aarch64-inline.o
[116/161] Generating RtsanTestObjects_FileOffset64.rtsan_test_interceptors_posix.cpp.aarch64.o
[117/161] Generating ASAN_NOINST_TEST_OBJECTS.gtest-all.cc.aarch64-calls.o
[118/161] Generating GwpAsanTestObjects.gtest-all.cc.aarch64.o
[119/161] Generating RtsanTestObjects.gtest-all.cc.aarch64.o
[120/161] Generating RtsanNoInstTestObjects.gtest-all.cc.aarch64.o
[121/161] Generating RtsanTestObjects.rtsan_test_interceptors_posix.cpp.aarch64.o
ninja: build stopped: subcommand failed.

How to reproduce locally: https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild





@llvm-ci
Copy link
Collaborator

llvm-ci commented May 7, 2025

LLVM Buildbot has detected a new failure on builder lldb-arm-ubuntu running on linaro-lldb-arm-ubuntu while building llvm at step 6 "test".

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

Here is the relevant piece of the build log for the reference
Step 6 (test) failure: build (failure)
...
PASS: lldb-api :: tools/lldb-dap/console/TestDAP_console.py (1170 of 3018)
PASS: lldb-api :: terminal/TestEditline.py (1171 of 3018)
UNSUPPORTED: lldb-api :: tools/lldb-dap/disassemble/TestDAP_disassemble.py (1172 of 3018)
UNSUPPORTED: lldb-api :: tools/lldb-dap/evaluate/TestDAP_evaluate.py (1173 of 3018)
PASS: lldb-api :: tools/lldb-dap/exception/TestDAP_exception.py (1174 of 3018)
PASS: lldb-api :: tools/lldb-dap/exception/cpp/TestDAP_exception_cpp.py (1175 of 3018)
UNSUPPORTED: lldb-api :: tools/lldb-dap/exception/objc/TestDAP_exception_objc.py (1176 of 3018)
PASS: lldb-api :: tools/lldb-dap/databreakpoint/TestDAP_setDataBreakpoints.py (1177 of 3018)
UNSUPPORTED: lldb-api :: tools/lldb-dap/extendedStackTrace/TestDAP_extendedStackTrace.py (1178 of 3018)
UNRESOLVED: lldb-api :: tools/lldb-dap/disconnect/TestDAP_disconnect.py (1179 of 3018)
******************** TEST 'lldb-api :: tools/lldb-dap/disconnect/TestDAP_disconnect.py' FAILED ********************
Script:
--
/usr/bin/python3.10 /home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env LLVM_LIBS_DIR=/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./lib --env LLVM_INCLUDE_DIR=/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/include --env LLVM_TOOLS_DIR=/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin --arch armv8l --build-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex --lldb-module-cache-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin/lldb --compiler /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin/clang --dsymutil /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin/dsymutil --make /usr/bin/gmake --llvm-tools-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin --lldb-obj-root /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/tools/lldb --lldb-libs-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./lib /home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/test/API/tools/lldb-dap/disconnect -p TestDAP_disconnect.py
--
Exit Code: 1

Command Output (stdout):
--
lldb version 21.0.0git (https://github.com/llvm/llvm-project.git revision c22081c320340d0e7542b247ee093ca515509b52)
  clang revision c22081c320340d0e7542b247ee093ca515509b52
  llvm revision c22081c320340d0e7542b247ee093ca515509b52
Skipping the following test categories: ['libc++', 'dsym', 'gmodules', 'debugserver', 'objc']

--
Command Output (stderr):
--
========= DEBUG ADAPTER PROTOCOL LOGS =========
1746621810.062856674 --> (stdin/stdout) {"command":"initialize","type":"request","arguments":{"adapterID":"lldb-native","clientID":"vscode","columnsStartAt1":true,"linesStartAt1":true,"locale":"en-us","pathFormat":"path","supportsRunInTerminalRequest":true,"supportsVariablePaging":true,"supportsVariableType":true,"supportsStartDebuggingRequest":true,"supportsProgressReporting":true,"$__lldb_sourceInitFile":false},"seq":1}
1746621810.068817377 <-- (stdin/stdout) {"body":{"$__lldb_version":"lldb version 21.0.0git (https://github.com/llvm/llvm-project.git revision c22081c320340d0e7542b247ee093ca515509b52)\n  clang revision c22081c320340d0e7542b247ee093ca515509b52\n  llvm revision c22081c320340d0e7542b247ee093ca515509b52","completionTriggerCharacters":["."," ","\t"],"exceptionBreakpointFilters":[{"default":false,"filter":"cpp_catch","label":"C++ Catch"},{"default":false,"filter":"cpp_throw","label":"C++ Throw"},{"default":false,"filter":"objc_catch","label":"Objective-C Catch"},{"default":false,"filter":"objc_throw","label":"Objective-C Throw"}],"supportTerminateDebuggee":true,"supportsBreakpointLocationsRequest":true,"supportsCancelRequest":true,"supportsCompletionsRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsDataBreakpoints":true,"supportsDelayedStackTraceLoading":true,"supportsDisassembleRequest":true,"supportsEvaluateForHovers":true,"supportsExceptionInfoRequest":true,"supportsExceptionOptions":true,"supportsFunctionBreakpoints":true,"supportsHitConditionalBreakpoints":true,"supportsInstructionBreakpoints":true,"supportsLogPoints":true,"supportsModulesRequest":true,"supportsReadMemoryRequest":true,"supportsRestartRequest":true,"supportsSetVariable":true,"supportsStepInTargetsRequest":true,"supportsSteppingGranularity":true,"supportsValueFormattingOptions":true},"command":"initialize","request_seq":1,"seq":0,"success":true,"type":"response"}
1746621810.069724560 --> (stdin/stdout) {"command":"attach","type":"request","arguments":{"pid":4129251,"initCommands":["settings clear --all","settings set symbols.enable-external-lookup false","settings set target.inherit-tcc true","settings set target.disable-aslr false","settings set target.detach-on-error false","settings set target.auto-apply-fixits false","settings set plugin.process.gdb-remote.packet-timeout 60","settings set symbols.clang-modules-cache-path \"/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api\"","settings set use-color false","settings set show-statusline false"]},"seq":2}
1746621810.071121931 <-- (stdin/stdout) {"body":{"category":"console","output":"Running initCommands:\n"},"event":"output","seq":0,"type":"event"}
1746621810.071459055 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings clear --all\n"},"event":"output","seq":0,"type":"event"}
1746621810.071542501 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings set symbols.enable-external-lookup false\n"},"event":"output","seq":0,"type":"event"}
1746621810.071594477 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings set target.inherit-tcc true\n"},"event":"output","seq":0,"type":"event"}
1746621810.071652174 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings set target.disable-aslr false\n"},"event":"output","seq":0,"type":"event"}
1746621810.071728706 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings set target.detach-on-error false\n"},"event":"output","seq":0,"type":"event"}
1746621810.071801186 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings set target.auto-apply-fixits false\n"},"event":"output","seq":0,"type":"event"}
1746621810.071878910 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings set plugin.process.gdb-remote.packet-timeout 60\n"},"event":"output","seq":0,"type":"event"}
1746621810.071956158 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings set symbols.clang-modules-cache-path \"/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api\"\n"},"event":"output","seq":0,"type":"event"}
1746621810.072077513 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings set use-color false\n"},"event":"output","seq":0,"type":"event"}
1746621810.072145700 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings set show-statusline false\n"},"event":"output","seq":0,"type":"event"}
1746621810.254232407 <-- (stdin/stdout) {"command":"attach","request_seq":2,"seq":0,"success":true,"type":"response"}
1746621810.254606009 <-- (stdin/stdout) {"body":{"module":{"addressRange":"6225920","debugInfoSize":"97.0KB","id":"65032E6C","name":"a.out","path":"/https/github.com/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/tools/lldb-dap/disconnect/TestDAP_disconnect.test_attach/a.out","symbolFilePath":"/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/tools/lldb-dap/disconnect/TestDAP_disconnect.test_attach/a.out","symbolStatus":"Symbols loaded."},"reason":"new"},"event":"module","seq":0,"type":"event"}
1746621810.256450891 <-- (stdin/stdout) {"body":{"module":{"addressRange":"4157997056","id":"E7A82D80-2FDA-232E-9C99-661C9BAA1445-B1AFEA53","name":"libm.so.6","path":"/https/github.com/lib/arm-linux-gnueabihf/libm.so.6","symbolStatus":"Symbols not found."},"reason":"new"},"event":"module","seq":0,"type":"event"}
1746621810.256524801 <-- (stdin/stdout) {"body":{"module":{"addressRange":"4157800448","id":"3654A16E-35F7-EEF1-0C40-3DDB5E0689B1-F36B76A6","name":"libgcc_s.so.1","path":"/https/github.com/lib/arm-linux-gnueabihf/libgcc_s.so.1","symbolStatus":"Symbols not found."},"reason":"new"},"event":"module","seq":0,"type":"event"}
1746621810.256562710 <-- (stdin/stdout) {"body":{"module":{"addressRange":"4156555264","id":"B1D0C0EB-A8EA-E644-0B34-664CA4DCF80A-F1F2788D","name":"libc.so.6","path":"/https/github.com/lib/arm-linux-gnueabihf/libc.so.6","symbolStatus":"Symbols not found."},"reason":"new"},"event":"module","seq":0,"type":"event"}
1746621810.256613970 <-- (stdin/stdout) {"body":{"isLocalProcess":true,"name":"/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/tools/lldb-dap/disconnect/TestDAP_disconnect.test_attach/a.out","startMethod":"attach","systemProcessId":4129251},"event":"process","seq":0,"type":"event"}
1746621810.256734610 <-- (stdin/stdout) {"body":{"module":{"addressRange":"4158390272","id":"9958B23A-FBFD-6813-A91D-7350E4D19199-A930F418","name":"libstdc++.so.6","path":"/https/github.com/lib/arm-linux-gnueabihf/libstdc++.so.6","symbolStatus":"Symbols not found."},"reason":"new"},"event":"module","seq":0,"type":"event"}

Pierre-vh added a commit that referenced this pull request May 7, 2025
@Pierre-vh
Copy link
Contributor Author

Reverted this because compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp fails. m constraint appears unsupported on aarch64.

I wonder if this should be a warning instead, so compilation keeps going?

Pierre-vh added a commit that referenced this pull request May 8, 2025
…rors (#135782)

The initial patch caused issues because it emits an error, and llc is sensitive to it.
It also caused compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp to fail.

Use warnings instead + reject lowering. That way, the fallback path is used without llc/clang returning a failure code.
If fallback isn't enabled then the warnings provide context as to why lowering failed.

Original commit description:
---
Instead of printing something to dbgs (which is not visible to all users),
emit a diagnostic like the DAG does. We still crash later because we fail to
select the inline assembly, but at least now users will know why it's crashing.

In a future patch we could also recover from the error like the DAG does, so the
lowering can keep going until it either crashes or gives a different error later.
Pierre-vh added a commit that referenced this pull request May 8, 2025
…rors (#139049)

The initial patch (#135782 caused issues because it emits an error, and llc is sensitive to it.
It also caused compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp to fail.

Use warnings instead + reject lowering. That way, the fallback path is used without llc/clang returning a failure code.
If fallback isn't enabled then the warnings provide context as to why lowering failed.

Original commit description for #135782:

Instead of printing something to dbgs (which is not visible to all users),
emit a diagnostic like the DAG does. We still crash later because we fail to
select the inline assembly, but at least now users will know why it's crashing.

In a future patch we could also recover from the error like the DAG does, so the
lowering can keep going until it either crashes or gives a different error later.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants