Skip to content
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

armv7: Assertion failed: (!NodePtr->isKnownSentinel()), function operator*, file include/llvm/ADT/ilist_iterator.h, line 139. #31925

Closed
DimitryAndric opened this issue Apr 8, 2017 · 5 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla

Comments

@DimitryAndric
Copy link
Collaborator

Bugzilla Link 32578
Resolution FIXED
Resolved on Nov 28, 2017 03:36
Version trunk
OS All
Attachments Test case reduced from libreoffice's shapeattributelayer.cxx
CC @dexonsmith,@rovka,@emaste,@MatzeB,@ostannard,@TNorthover,@vedantk

Extended Description

Here is an assertion encountered by Michal Meloun, while compiling LibreOffice's slideshow/source/engine/shapeattributelayer.cxx file for armv7-freebsd:

Assertion failed: (!NodePtr->isKnownSentinel()), function operator*, file include/llvm/ADT/ilist_iterator.h, line 139.

Attached is a reduced test case, to be compiled with:

clang -cc1 -triple armv7 -S -O2 lo.cpp

Specifically, the 'armv7' is important, just 'arm' or 'armv6' will not trigger the assertion.

@DimitryAndric
Copy link
Collaborator Author

assigned to @MatzeB

@vedantk
Copy link
Collaborator

vedantk commented Apr 26, 2017

Reduced IR test case, simply run llc
This crashes with trunk.

@vedantk
Copy link
Collaborator

vedantk commented Apr 26, 2017

Naive patch:

diff --git a/lib/Target/ARM/ARMFrameLowering.cpp b/lib/Target/ARM/ARMFrameLowering.cpp
index 4f7a0ab4e22..7dd5f999843 100644
--- a/lib/Target/ARM/ARMFrameLowering.cpp
+++ b/lib/Target/ARM/ARMFrameLowering.cpp
@@ -479,7 +479,7 @@ void ARMFrameLowering::emitPrologue(MachineFunction &MF,
   if (DPRCSSize > 0) {
     // Since vpush register list cannot have gaps, there may be multiple vpush
     // instructions in the prologue.
-    while (MBBI->getOpcode() == ARM::VSTMDDB_UPD) {
+    while (MBBI != MBB.end() && MBBI->getOpcode() == ARM::VSTMDDB_UPD) {
       DefCFAOffsetCandidates.addInst(MBBI, sizeOfSPAdjustment(*MBBI));
       LastPush = MBBI++;
     }

@MatzeB
Copy link
Contributor

MatzeB commented Nov 28, 2017

Thanks for the patch Vedant and sorry for the long delay. Committed in r319130

@DimitryAndric
Copy link
Collaborator Author

Might be nice to get this into 5.0.1 too, as it is a small change?

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

3 participants