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

Weird Failure: test/Regression/CodeGen/Generic/print-arith-int.ll #1409

Closed
llvmbot opened this issue Dec 7, 2006 · 9 comments
Closed

Weird Failure: test/Regression/CodeGen/Generic/print-arith-int.ll #1409

llvmbot opened this issue Dec 7, 2006 · 9 comments
Labels
bugzilla Issues migrated from bugzilla llvm:codegen

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Dec 7, 2006

Bugzilla Link 1037
Resolution FIXED
Resolved on Nov 07, 2018 00:17
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor

Extended Description

This test started failing on the cvs head today:
llc: /proj/llvm/llvm-1/include/llvm/Target/MRegisterInfo.h:236: static bool
llvm::MRegisterInfo::isVirtualRegister(unsigned int): Assertion `Reg && "this is
not a register!"' failed.
llc((anonymous namespace)::PrintStackTrace()+0x1a)[0x886f136]
llc((anonymous namespace)::SignalHandler(int)+0x110)[0x886f45e]
[0x346420]
/lib/libc.so.6(abort+0x101)[0x15e4f1]
/lib/libc.so.6(__assert_fail+0xfd)[0x156859]
llc(llvm::MRegisterInfo::isVirtualRegister(unsigned int)+0x30)[0x84e838a]
llc(llvm::VirtRegMap::getStackSlot(unsigned int) const+0x11)[0x86e40eb]
llc(llvm::VirtRegMap::hasStackSlot(unsigned int) const+0x18)[0x86e4146]
llc[0x86e2083]
llc[0x86e9396]
llc[0x86cee7d]
llc(llvm::MachineFunctionPass::runOnFunction(llvm::Function&)+0x28)[0x83edb7c]
llc(llvm::FunctionPassManagerT::runPass(llvm::FunctionPass*,
llvm::Function*)+0x1f)[0x87f25e3]
llc(llvm::PassManagerTllvm::FTraits::runPasses(llvm::Function*,
std::map<llvm::Pass*, std::vector<llvm::Pass*, std::allocatorllvm::Pass* >,
std::lessllvm::Pass*, std::allocator<std::pair<llvm::Pass* const,
std::vector<llvm::Pass*, std::allocatorllvm::Pass* > > > >&)+0x12a)[0x8803960]
llc(llvm::PassManagerTllvm::FTraits::runOnUnit(llvm::Function*)+0x184)[0x8806114]
llc(llvm::FunctionPassManagerT::runOnFunction(llvm::Function&)+0x23)[0x87f26c5]
llc(llvm::FunctionPassManager::run(llvm::Function&)+0x91)[0x87f0abb]
llc(main+0x925)[0x83dcfbd]
/lib/libc.so.6(__libc_start_main+0xdc)[0x14a4e4]
llc(__gxx_personality_v0+0x16d)[0x83dbd61]
Aborted

@llvmbot
Copy link
Collaborator Author

llvmbot commented Dec 7, 2006

*** Bug #1408 has been marked as a duplicate of this bug. ***

@llvmbot
Copy link
Collaborator Author

llvmbot commented Dec 7, 2006

This problem is hard to track down because it is probably dependent on memory
contents. Here's how I know that:

  1. It fails if it reads the test case from std in, but not if you create the
    bytecode before hand and pass it in on the command line to llc.

  2. It doesn't fail when run under the debugger.

  3. It doesn't always fail when run from the command line.

@llvmbot
Copy link
Collaborator Author

llvmbot commented Dec 7, 2006

This recent patch in VirtRegMap could be to blame:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20061204/040942.html

Evan?

@llvmbot
Copy link
Collaborator Author

llvmbot commented Dec 7, 2006

This is now breaking the llvm-gcc build:

/proj/llvm/cfe/build-3/gcc/xgcc -B/proj/llvm/cfe/build-3/gcc/
-B/proj/llvm/cfe/install-3/i686-pc-linux-gnu/bin/
-B/proj/llvm/cfe/install-3/i686-pc-linux-gnu/lib/ -isystem
/proj/llvm/cfe/install-3/i686-pc-linux-gnu/include -isystem
/proj/llvm/cfe/install-3/i686-pc-linux-gnu/sys-include -O2 -DIN_GCC -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-isystem ./include -fPIC -g -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I.
-I../../src-3/gcc -I../../src-3/gcc/. -I../../src-3/gcc/../include
-I../../src-3/gcc/../libcpp/include -I/proj/llvm/llvm-3/include
-I/proj/llvm/llvm-3/include -Dmalloc=kern_os_malloc -Dfree=kern_os_free
-DLIBCC_KEXT -static -fno-pic -fno-exceptions -fno-non-call-exceptions
-DL_gcov_merge_single -c ../../src-3/gcc/libgcov.c -o
libgcc/kext/_gcov_merge_single.o
In file included from ../../src-3/gcc/gcov-io.h:239,
from ../../src-3/gcc/libgcov.c:51:
./auto-host.h:257:1: warning: "HAVE_DECL_GETOPT" redefined
In file included from ../../src-3/gcc/libgcov.c:37:
../../src-3/gcc/tsystem.h:40:1: warning: this is the location of the previous
definition
cc1: VirtRegMap.h:117: int llvm::VirtRegMap::getStackSlot(unsigned int) const:
Assertion `MRegisterInfo::isVirtualRegister(virtReg)' failed.
../../src-3/gcc/unwind-dw2-fde-glibc.c: At top level:
../../src-3/gcc/unwind-dw2-fde-glibc.c:426: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See URL:http://llvm.org/bugs for instructions.

@llvmbot
Copy link
Collaborator Author

llvmbot commented Dec 7, 2006

It turns out that this patch:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20061204/040942.html
was the cause of the problem.

I've reverted it.

Evan: please test your patches with at least llvm/test before committing.

@llvmbot
Copy link
Collaborator Author

llvmbot commented Dec 7, 2006

First of all. I did run the dejagnu tests. Everything passes for me.

I've tried the test with both Mac and Linux triple. Passes everytime. As you
sugggested, it could be a memory related issue.

Your fix is not right. That change is not wrong. It's possible that it could
have exposed bugs everywhere. I'll run some more tests after I re-commit it.

@llvmbot
Copy link
Collaborator Author

llvmbot commented Dec 8, 2006

That's weird. It fails for me every time when the input to llc is stdin, as in
the test case. It doesn't fail if the input is read from a file. I imagine you
didn't try this on Linux. It could be Linux specific.

As for the patch, reverting it made it not fail. I tried it several times.

If you're inclined to re-apply the patch, please note that it will break my
llvm-gcc4 build as noted above. If you have other patch ideas, please attach
here and I'll try them out before committing to the repository.

Thanks, Evan.

@llvmbot
Copy link
Collaborator Author

llvmbot commented Dec 8, 2006

Works okay now, Evan.

Thanks!

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
clementval pushed a commit to clementval/llvm-project that referenced this issue Jan 26, 2022
Traversal of an expression can cause subexpressions to be copied onto
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 llvm:codegen
Projects
None yet
Development

No branches or pull requests

1 participant