Skip to content

Conversation

thurstond
Copy link
Contributor

@thurstond thurstond commented Oct 8, 2025

Use-after-poison happens because after SP::V8BAR is handled, it erases MI, which should therefore not be inspected by ExpandPostRA::run().

This fixes a buildbot reported issue from #154950 (https://lab.llvm.org/buildbot/#/builders/24/builds/13433).

…dled

Buildbot report: https://lab.llvm.org/buildbot/#/builders/24/builds/13433

Use-after-poison happens because after SP::V8BAR is handled, it erases MI, which should thereafter not be
inspected by ExpandPostRA::run.
@llvmbot
Copy link
Member

llvmbot commented Oct 8, 2025

@llvm/pr-subscribers-backend-sparc

Author: Thurston Dang (thurstond)

Changes

Buildbot report: https://lab.llvm.org/buildbot/#/builders/24/builds/13433

Use-after-poison happens because after SP::V8BAR is handled, it erases MI, which should thereafter not be inspected by ExpandPostRA::run.


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

1 Files Affected:

  • (modified) llvm/lib/Target/Sparc/SparcInstrInfo.cpp (+1)
diff --git a/llvm/lib/Target/Sparc/SparcInstrInfo.cpp b/llvm/lib/Target/Sparc/SparcInstrInfo.cpp
index c0cd0176efa30..f66eb9dbee2dc 100644
--- a/llvm/lib/Target/Sparc/SparcInstrInfo.cpp
+++ b/llvm/lib/Target/Sparc/SparcInstrInfo.cpp
@@ -668,6 +668,7 @@ bool SparcInstrInfo::expandPostRAPseudo(MachineInstr &MI) const {
              .addImm(-1);
     MIBundleBuilder(MBB, InstSTBAR, InstLDSTUB);
     MBB.erase(MI);
+    return true;
   }
   }
   return false;

@thurstond
Copy link
Contributor Author

Compilation is running slowly, I will check if the test(s) needs updating

@thurstond thurstond changed the title [SPARC] Fix-forward #154950 by returning true if SP::V8BAR if handled [SPARC] Fix-forward #154950 by returning true if SP::V8BAR is handled Oct 8, 2025
@thurstond thurstond enabled auto-merge (squash) October 8, 2025 05:25
@thurstond thurstond merged commit a1f9ad2 into llvm:main Oct 8, 2025
11 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 8, 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/21805

Here is the relevant piece of the build log for the reference
Step 6 (test) failure: build (failure)
...
PASS: lldb-unit :: Core/./LLDBCoreTests/93/470 (2454 of 3717)
PASS: lldb-unit :: Core/./LLDBCoreTests/94/470 (2455 of 3717)
PASS: lldb-unit :: Core/./LLDBCoreTests/96/470 (2456 of 3717)
PASS: lldb-unit :: Core/./LLDBCoreTests/97/470 (2457 of 3717)
PASS: lldb-unit :: Core/./LLDBCoreTests/98/470 (2458 of 3717)
PASS: lldb-unit :: Core/./LLDBCoreTests/99/470 (2459 of 3717)
PASS: lldb-unit :: DAP/./DAPTests/0/76 (2460 of 3717)
PASS: lldb-unit :: DAP/./DAPTests/1/76 (2461 of 3717)
PASS: lldb-unit :: DAP/./DAPTests/12/76 (2462 of 3717)
PASS: lldb-unit :: DAP/./DAPTests/11/76 (2463 of 3717)
FAIL: lldb-unit :: DAP/./DAPTests/10/76 (2464 of 3717)
******************** TEST 'lldb-unit :: DAP/./DAPTests/10/76' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/tools/lldb/unittests/DAP/./DAPTests-lldb-unit-3920950-10-76.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=76 GTEST_SHARD_INDEX=10 /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/tools/lldb/unittests/DAP/./DAPTests
--

Script:
--
/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/tools/lldb/unittests/DAP/./DAPTests --gtest_filter=DisconnectRequestHandlerTest.DisconnectTriggersTerminateCommands
--
../llvm-project/lldb/unittests/DAP/Handler/DisconnectTest.cpp:51: Failure
Actual function call count doesn't match EXPECT_CALL(client, Received(Output("1\n")))...
         Expected: to be called once
           Actual: never called - unsatisfied and active

../llvm-project/lldb/unittests/DAP/Handler/DisconnectTest.cpp:52: Failure
Actual function call count doesn't match EXPECT_CALL(client, Received(Output("2\n")))...
         Expected: to be called twice
           Actual: called once - unsatisfied and active


../llvm-project/lldb/unittests/DAP/Handler/DisconnectTest.cpp:51
Actual function call count doesn't match EXPECT_CALL(client, Received(Output("1\n")))...
         Expected: to be called once
           Actual: never called - unsatisfied and active

../llvm-project/lldb/unittests/DAP/Handler/DisconnectTest.cpp:52
Actual function call count doesn't match EXPECT_CALL(client, Received(Output("2\n")))...
         Expected: to be called twice
           Actual: called once - unsatisfied and active



********************
PASS: lldb-unit :: DAP/./DAPTests/13/76 (2465 of 3717)
PASS: lldb-unit :: DAP/./DAPTests/14/76 (2466 of 3717)
PASS: lldb-unit :: DAP/./DAPTests/15/76 (2467 of 3717)
PASS: lldb-unit :: DAP/./DAPTests/16/76 (2468 of 3717)

svkeerthy pushed a commit that referenced this pull request Oct 9, 2025
…#162424)

Use-after-poison happens because after SP::V8BAR is handled, it erases
MI, which therefore should not be inspected by `ExpandPostRA::run()`.

This fixes a buildbot-reported issue from #154950
(https://lab.llvm.org/buildbot/#/builders/24/builds/13433).
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.

4 participants