LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 52045 - invalid.mlir test leaks memory in Parser
Summary: invalid.mlir test leaks memory in Parser
Status: NEW
Alias: None
Product: MLIR
Classification: Unclassified
Component: Core (show other bugs)
Version: unspecified
Hardware: PC All
: P enhancement
Assignee: River Riddle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-02 16:51 PDT by Mehdi Amini
Modified: 2021-10-02 16:51 PDT (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mehdi Amini 2021-10-02 16:51:38 PDT
Trace looks like this:

```
    #0 0xda5938d in operator new(unsigned long) (build-asan/bin/mlir-opt+0xda5938d)
    #1 0x122b1ff3 in (anonymous namespace)::OperationParser::defineBlockNamed(llvm::StringRef, llvm::SMLoc, mlir::Block*) mlir/lib/Parser/Parser.cpp:1837:47
    #2 0x122b0c7f in (anonymous namespace)::OperationParser::parseBlock(mlir::Block*&) mlir/lib/Parser/Parser.cpp:1779:11
    #3 0x122afc50 in (anonymous namespace)::OperationParser::parseRegionBody(mlir::Region&, llvm::SMLoc, llvm::ArrayRef<std::pair<(anonymous namespace)::OperationParser::SSAUseInfo, mlir::Type> >, bool) mlir/lib/Parser/Parser.cpp:1743:9
    #4 0x122ae9bb in (anonymous namespace)::OperationParser::parseRegion(mlir::Region&, llvm::ArrayRef<std::pair<(anonymous namespace)::OperationParser::SSAUseInfo, mlir::Type> >, bool) mlir/lib/Parser/Parser.cpp:1669:7
    #5 0x122a87f1 in (anonymous namespace)::CustomOpAsmParser::parseRegion(mlir::Region&, llvm::ArrayRef<mlir::OpAsmParser::OperandType>, llvm::ArrayRef<mlir::Type>, bool) mlir/lib/Parser/Parser.cpp:1359:16
    #6 0x122a8b45 in (anonymous namespace)::CustomOpAsmParser::parseOptionalRegion(mlir::Region&, llvm::ArrayRef<mlir::OpAsmParser::OperandType>, llvm::ArrayRef<mlir::Type>, bool) mlir/lib/Parser/Parser.cpp:1371:12
    #7 0x12892d9f in mlir::function_like_impl::parseFunctionLikeOp(mlir::OpAsmParser&, mlir::OperationState&, bool, llvm::function_ref<mlir::Type (mlir::Builder&, llvm::ArrayRef<mlir::Type>, llvm::ArrayRef<mlir::Type>, mlir::function_like_impl::VariadicFlag, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)>) mlir/lib/IR/FunctionImplementation.cpp:258:44
    #8 0x1276e651 in parseFuncOp(mlir::OpAsmParser&, mlir::OperationState&) mlir/lib/IR/BuiltinDialect.cpp:122:10
    #9 0x1276e558 in mlir::FuncOp::parse(mlir::OpAsmParser&, mlir::OperationState&) build-asan/tools/mlir/include/mlir/IR/BuiltinOps.cpp.inc:252:10
```