[LLVMbugs] [Bug 6638] New: IntrinsicEmitter::EmitFnNameRecognizer assumes all function names at least 6 characters long

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Mar 17 11:46:47 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=6638

           Summary: IntrinsicEmitter::EmitFnNameRecognizer assumes all
                    function names at least 6 characters long
           Product: tools
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: TableGen
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: jyasskin at google.com
                CC: llvmbugs at cs.uiuc.edu


None of TargetIntrinsicInfo::getIntrinsicID() or the definitions of lookupName
(Blackfin and MBlaze) enforce this.

******************** TEST 'LLVM :: CodeGen/Blackfin/frameindex.ll' FAILED
********************
Script:
--
llc < /home/jyasskin/llvm/src/test/CodeGen/Blackfin/frameindex.ll -march=bfin
-verify-machineinstrs
--
Exit Code: 1
Command Output (stdout):
--
Command has output on stderr!
...
--
Command Output (stderr):
--
==5337== Invalid read of size 1
==5337==    at 0xA538E3: llvm::BlackfinIntrinsicInfo::lookupName(char const*,
unsigned int) const (BlackfinGenIntrinsics.inc:34)
==5337==    by 0x1104120:
llvm::TargetIntrinsicInfo::getIntrinsicID(llvm::Function*) const
(TargetIntrinsicInfo.cpp:29)
==5337==    by 0xD7B25A: llvm::SelectionDAGBuilder::visitCall(llvm::CallInst&)
(SelectionDAGBuilder.cpp:4653)
==5337==    by 0xD56DE9: llvm::SelectionDAGBuilder::visit(unsigned int,
llvm::User&) (Instruction.def:161)
==5337==    by 0xD568F5: llvm::SelectionDAGBuilder::visit(llvm::Instruction&)
(SelectionDAGBuilder.cpp:617)
==5337==    by 0xD98380:
llvm::SelectionDAGISel::SelectBasicBlock(llvm::BasicBlock*,
llvm::ilist_iterator<llvm::Instruction>,
llvm::ilist_iterator<llvm::Instruction>, bool&) (SelectionDAGISel.cpp:407)
==5337==    by 0xD9B776:
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function&,
llvm::MachineFunction&, llvm::MachineModuleInfo*, llvm::DwarfWriter*,
llvm::TargetInstrInfo const&) (SelectionDAGISel.cpp:1030)
==5337==    by 0xD9800A:
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(SelectionDAGISel.cpp:344)
==5337==    by 0xEB2F92:
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(MachineFunctionPass.cpp:27)
==5337==    by 0x11CDA2C: llvm::FPPassManager::runOnFunction(llvm::Function&)
(PassManager.cpp:1350)
==5337==    by 0x11CD704: llvm::FunctionPassManagerImpl::run(llvm::Function&)
(PassManager.cpp:1301)
==5337==    by 0x11CD3B4: llvm::FunctionPassManager::run(llvm::Function&)
(PassManager.cpp:1231)
==5337==  Address 0x5d76cc5 is 1 bytes after a block of size 20 alloc'd
==5337==    at 0x4C221A7: malloc (vg_replace_malloc.c:195)
==5337==    by 0xAA40A1: llvm::MallocAllocator::Allocate(unsigned long,
unsigned long) (Allocator.h:31)
==5337==    by 0x11F4D46: llvm::StringMapEntry<llvm::Value*>*
llvm::StringMapEntry<llvm::Value*>::Create<llvm::MallocAllocator,
llvm::Value*>(char const*, char const*, llvm::MallocAllocator&, llvm::Value*)
(StringMap.h:173)
==5337==    by 0x11F49ED: llvm::StringMapEntry<llvm::Value*>*
llvm::StringMapEntry<llvm::Value*>::Create<llvm::Value*>(char const*, char
const*, llvm::Value*) (StringMap.h:200)
==5337==    by 0x11F461A: llvm::StringMapEntry<llvm::Value*>::Create(char
const*, char const*) (StringMap.h:204)
==5337==    by 0x11F3088: llvm::Value::setName(llvm::Twine const&)
(Value.cpp:201)
==5337==    by 0x118DFCC: llvm::GlobalValue::GlobalValue(llvm::Type const*,
llvm::Value::ValueTy, llvm::Use*, unsigned int,
llvm::GlobalValue::LinkageTypes, llvm::Twine const&) (GlobalValue.h:61)
==5337==    by 0x1173EE5: llvm::Function::Function(llvm::FunctionType const*,
llvm::GlobalValue::LinkageTypes, llvm::Twine const&, llvm::Module*)
(Function.cpp:156)
==5337==    by 0x9A4D2E: llvm::Function::Create(llvm::FunctionType const*,
llvm::GlobalValue::LinkageTypes, llvm::Twine const&, llvm::Module*)
(Function.h:126)
==5337==    by 0x99D6BA: llvm::LLParser::ParseFunctionHeader(llvm::Function*&,
bool) (LLParser.cpp:2787)
==5337==    by 0x98F223: llvm::LLParser::ParseDeclare() (LLParser.cpp:381)
==5337==    by 0x98DF9C: llvm::LLParser::ParseTopLevelEntities()
(LLParser.cpp:160)
==5337== 
--

********************

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list