Skip to content

Valgrind reports memory leak when using Cpp runtime #1811

@jasonar81

Description

@jasonar81

16 bytes in 1 blocks are possibly lost in loss record 353 of 4,105
==27141== at 0x4C2D1AF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==27141== by 0x76809C: allocate (new_allocator.h:104)
==27141== by 0x76809C: allocate (alloc_traits.h:416)
==27141== by 0x76809C: _M_allocate (stl_vector.h:170)
==27141== by 0x76809C: _M_create_storage (stl_vector.h:185)
==27141== by 0x76809C: Vector_base (stl_vector.h:136)
==27141== by 0x76809C: vector (stl_vector.h:322)
==27141== by 0x76809C: antlr4::atn::ArrayPredictionContext::ArrayPredictionContext(std::vector<std::shared_ptrantlr4::atn::PredictionContext, std::allocator<std::shared_ptrantlr4::atn::PredictionContext > > const&, std::vector<unsigned long, std::allocator > const&) (ArrayPredictionContext.cpp:19)
==27141== by 0x6C6299: construct<antlr4::atn::ArrayPredictionContext, std::vector<std::shared_ptrantlr4::atn::PredictionContext, std::allocator<std::shared_ptrantlr4::atn::PredictionContext > >&, const std::vector<long unsigned int, std::allocator >&> (new_allocator.h:120)
==27141== by 0x6C6299: construct<antlr4::atn::ArrayPredictionContext, std::vector<std::shared_ptrantlr4::atn::PredictionContext, std::allocator<std::shared_ptrantlr4::atn::PredictionContext > >&, const std::vector<long unsigned int, std::allocator >&> (alloc_traits.h:455)
==27141== by 0x6C6299: Sp_counted_ptr_inplace<std::vector<std::shared_ptrantlr4::atn::PredictionContext, std::allocator<std::shared_ptrantlr4::atn::PredictionContext > >&, const std::vector<long unsigned int, std::allocator >&> (shared_ptr_base.h:520)
==27141== by 0x6C6299: shared_count<antlr4::atn::ArrayPredictionContext, std::allocatorantlr4::atn::ArrayPredictionContext, std::vector<std::shared_ptrantlr4::atn::PredictionContext, std::allocator<std::shared_ptrantlr4::atn::PredictionContext > >&, const std::vector<long unsigned int, std::allocator >&> (shared_ptr_base.h:615)
==27141== by 0x6C6299: std::shared_ptr<antlr4::atn::ArrayPredictionContext, (gnu_cxx::Lock_policy)2>::shared_ptr<std::allocatorantlr4::atn::ArrayPredictionContext, std::vector<std::shared_ptrantlr4::atn::PredictionContext, std::allocator<std::shared_ptrantlr4::atn::PredictionContext > >&, std::vector<unsigned long, std::allocator >&>(std::Sp_make_shared_tag, std::allocatorantlr4::atn::ArrayPredictionContext const&, std::vector<std::shared_ptrantlr4::atn::PredictionContext, std::allocator<std::shared_ptrantlr4::atn::PredictionContext > >&, std::vector<unsigned long, std::allocator >&) (shared_ptr_base.h:1100)
==27141== by 0x6BF9CE: shared_ptr<std::allocatorantlr4::atn::ArrayPredictionContext, std::vector<std::shared_ptrantlr4::atn::PredictionContext, std::allocator<std::shared_ptrantlr4::atn::PredictionContext > >&, std::vector<long unsigned int, std::allocator >&> (shared_ptr.h:319)
==27141== by 0x6BF9CE: allocate_shared<antlr4::atn::ArrayPredictionContext, std::allocatorantlr4::atn::ArrayPredictionContext, std::vector<std::shared_ptrantlr4::atn::PredictionContext, std::allocator<std::shared_ptrantlr4::atn::PredictionContext > >&, std::vector<long unsigned int, std::allocator >&> (shared_ptr.h:620)
==27141== by 0x6BF9CE: make_shared<antlr4::atn::ArrayPredictionContext, std::vector<std::shared_ptrantlr4::atn::PredictionContext, std::allocator<std::shared_ptrantlr4::atn::PredictionContext > >&, std::vector<long unsigned int, std::allocator >&> (shared_ptr.h:636)
==27141== by 0x6BF9CE: antlr4::atn::PredictionContext::mergeSingletons(std::shared_ptrantlr4::atn::SingletonPredictionContext const&, std::shared_ptrantlr4::atn::SingletonPredictionContext const&, bool, antlr4::atn::PredictionContextMergeCache*) (PredictionContext.cpp:208)
==27141== by 0x6C01F2: antlr4::atn::PredictionContext::merge(std::shared_ptrantlr4::atn::PredictionContext const&, std::shared_ptrantlr4::atn::PredictionContext const&, bool, antlr4::atn::PredictionContextMergeCache*) (PredictionContext.cpp:106)
==27141== by 0x6D7467: antlr4::atn::ATNConfigSet::add(std::shared_ptrantlr4::atn::ATNConfig const&, antlr4::atn::PredictionContextMergeCache*) (ATNConfigSet.cpp:60)
==27141== by 0x6E637C: antlr4::atn::ParserATNSimulator::closure
(std::shared_ptrantlr4::atn::ATNConfig const&, antlr4::atn::ATNConfigSet*, std::unordered_set<std::shared_ptrantlr4::atn::ATNConfig, antlr4::atn::ATNConfig::Hasher, antlr4::atn::ATNConfig::Comparer, std::allocator<std::shared_ptrantlr4::atn::ATNConfig > >&, bool, bool, int, bool) (ParserATNSimulator.cpp:883)
==27141== by 0x6E2FD8: antlr4::atn::ParserATNSimulator::closureCheckingStopState(std::shared_ptrantlr4::atn::ATNConfig const&, antlr4::atn::ATNConfigSet*, std::unordered_set<std::shared_ptrantlr4::atn::ATNConfig, antlr4::atn::ATNConfig::Hasher, antlr4::atn::ATNConfig::Comparer, std::allocator<std::shared_ptrantlr4::atn::ATNConfig > >&, bool, bool, int, bool) (ParserATNSimulator.cpp:873)
==27141== by 0x6E6205: antlr4::atn::ParserATNSimulator::closure
(std::shared_ptrantlr4::atn::ATNConfig const&, antlr4::atn::ATNConfigSet*, std::unordered_set<std::shared_ptrantlr4::atn::ATNConfig, antlr4::atn::ATNConfig::Hasher, antlr4::atn::ATNConfig::Comparer, std::allocator<std::shared_ptrantlr4::atn::ATNConfig > >&, bool, bool, int, bool) (ParserATNSimulator.cpp:942)
==27141== by 0x6E2FD8: antlr4::atn::ParserATNSimulator::closureCheckingStopState(std::shared_ptrantlr4::atn::ATNConfig const&, antlr4::atn::ATNConfigSet*, std::unordered_set<std::shared_ptrantlr4::atn::ATNConfig, antlr4::atn::ATNConfig::Hasher, antlr4::atn::ATNConfig::Comparer, std::allocator<std::shared_ptrantlr4::atn::ATNConfig > >&, bool, bool, int, bool) (ParserATNSimulator.cpp:873)
==27141== by 0x6E6205: antlr4::atn::ParserATNSimulator::closure
(std::shared_ptrantlr4::atn::ATNConfig const&, antlr4::atn::ATNConfigSet*, std::unordered_set<std::shared_ptrantlr4::atn::ATNConfig, antlr4::atn::ATNConfig::Hasher, antlr4::atn::ATNConfig::Comparer, std::allocator<std::shared_ptrantlr4::atn::ATNConfig > >&, bool, bool, int, bool) (ParserATNSimulator.cpp:942)
==27141== by 0x6E2FD8: antlr4::atn::ParserATNSimulator::closureCheckingStopState(std::shared_ptrantlr4::atn::ATNConfig const&, antlr4::atn::ATNConfigSet*, std::unordered_set<std::shared_ptrantlr4::atn::ATNConfig, antlr4::atn::ATNConfig::Hasher, antlr4::atn::ATNConfig::Comparer, std::allocator<std::shared_ptrantlr4::atn::ATNConfig > >&, bool, bool, int, bool) (ParserATNSimulator.cpp:873)
==27141== by 0x6E6205: antlr4::atn::ParserATNSimulator::closure
(std::shared_ptrantlr4::atn::ATNConfig const&, antlr4::atn::ATNConfigSet*, std::unordered_set<std::shared_ptrantlr4::atn::ATNConfig, antlr4::atn::ATNConfig::Hasher, antlr4::atn::ATNConfig::Comparer, std::allocator<std::shared_ptrantlr4::atn::ATNConfig > >&, bool, bool, int, bool) (ParserATNSimulator.cpp:942)
==27141== by 0x6E2FD8: antlr4::atn::ParserATNSimulator::closureCheckingStopState(std::shared_ptrantlr4::atn::ATNConfig const&, antlr4::atn::ATNConfigSet*, std::unordered_set<std::shared_ptrantlr4::atn::ATNConfig, antlr4::atn::ATNConfig::Hasher, antlr4::atn::ATNConfig::Comparer, std::allocator<std::shared_ptrantlr4::atn::ATNConfig > >&, bool, bool, int, bool) (ParserATNSimulator.cpp:873)
==27141== by 0x6E6205: antlr4::atn::ParserATNSimulator::closure
(std::shared_ptrantlr4::atn::ATNConfig const&, antlr4::atn::ATNConfigSet*, std::unordered_set<std::shared_ptrantlr4::atn::ATNConfig, antlr4::atn::ATNConfig::Hasher, antlr4::atn::ATNConfig::Comparer, std::allocator<std::shared_ptrantlr4::atn::ATNConfig > >&, bool, bool, int, bool) (ParserATNSimulator.cpp:942)
==27141== by 0x6E2FD8: antlr4::atn::ParserATNSimulator::closureCheckingStopState(std::shared_ptrantlr4::atn::ATNConfig const&, antlr4::atn::ATNConfigSet*, std::unordered_set<std::shared_ptrantlr4::atn::ATNConfig, antlr4::atn::ATNConfig::Hasher, antlr4::atn::ATNConfig::Comparer, std::allocator<std::shared_ptrantlr4::atn::ATNConfig > >&, bool, bool, int, bool) (ParserATNSimulator.cpp:873)
==27141== by 0x6E6205: antlr4::atn::ParserATNSimulator::closure
(std::shared_ptrantlr4::atn::ATNConfig const&, antlr4::atn::ATNConfigSet*, std::unordered_set<std::shared_ptrantlr4::atn::ATNConfig, antlr4::atn::ATNConfig::Hasher, antlr4::atn::ATNConfig::Comparer, std::allocator<std::shared_ptrantlr4::atn::ATNConfig > >&, bool, bool, int, bool) (ParserATNSimulator.cpp:942)
==27141== by 0x6E2FD8: antlr4::atn::ParserATNSimulator::closureCheckingStopState(std::shared_ptrantlr4::atn::ATNConfig const&, antlr4::atn::ATNConfigSet*, std::unordered_set<std::shared_ptrantlr4::atn::ATNConfig, antlr4::atn::ATNConfig::Hasher, antlr4::atn::ATNConfig::Comparer, std::allocator<std::shared_ptrantlr4::atn::ATNConfig > >&, bool, bool, int, bool) (ParserATNSimulator.cpp:873)
==27141== by 0x6E6205: antlr4::atn::ParserATNSimulator::closure
(std::shared_ptrantlr4::atn::ATNConfig const&, antlr4::atn::ATNConfigSet*, std::unordered_set<std::shared_ptrantlr4::atn::ATNConfig, antlr4::atn::ATNConfig::Hasher, antlr4::atn::ATNConfig::Comparer, std::allocator<std::shared_ptrantlr4::atn::ATNConfig > >&, bool, bool, int, bool) (ParserATNSimulator.cpp:942)
==27141== by 0x6E2FD8: antlr4::atn::ParserATNSimulator::closureCheckingStopState(std::shared_ptrantlr4::atn::ATNConfig const&, antlr4::atn::ATNConfigSet*, std::unordered_set<std::shared_ptrantlr4::atn::ATNConfig, antlr4::atn::ATNConfig::Hasher, antlr4::atn::ATNConfig::Comparer, std::allocator<std::shared_ptrantlr4::atn::ATNConfig > >&, bool, bool, int, bool) (ParserATNSimulator.cpp:873)
==27141== by 0x6E2F44: antlr4::atn::ParserATNSimulator::closureCheckingStopState(std::shared_ptrantlr4::atn::ATNConfig const&, antlr4::atn::ATNConfigSet*, std::unordered_set<std::shared_ptrantlr4::atn::ATNConfig, antlr4::atn::ATNConfig::Hasher, antlr4::atn::ATNConfig::Comparer, std::allocator<std::shared_ptrantlr4::atn::ATNConfig > >&, bool, bool, int, bool) (ParserATNSimulator.cpp:861)
==27141== by 0x6E6205: antlr4::atn::ParserATNSimulator::closure
(std::shared_ptrantlr4::atn::ATNConfig const&, antlr4::atn::ATNConfigSet*, std::unordered_set<std::shared_ptrantlr4::atn::ATNConfig, antlr4::atn::ATNConfig::Hasher, antlr4::atn::ATNConfig::Comparer, std::allocator<std::shared_ptrantlr4::atn::ATNConfig > >&, bool, bool, int, bool) (ParserATNSimulator.cpp:942)
==27141== by 0x6E2FD8: antlr4::atn::ParserATNSimulator::closureCheckingStopState(std::shared_ptrantlr4::atn::ATNConfig const&, antlr4::atn::ATNConfigSet*, std::unordered_set<std::shared_ptrantlr4::atn::ATNConfig, antlr4::atn::ATNConfig::Hasher, antlr4::atn::ATNConfig::Comparer, std::allocator<std::shared_ptrantlr4::atn::ATNConfig > >&, bool, bool, int, bool) (ParserATNSimulator.cpp:873)
==27141== by 0x6E6205: antlr4::atn::ParserATNSimulator::closure(std::shared_ptrantlr4::atn::ATNConfig const&, antlr4::atn::ATNConfigSet*, std::unordered_set<std::shared_ptrantlr4::atn::ATNConfig, antlr4::atn::ATNConfig::Hasher, antlr4::atn::ATNConfig::Comparer, std::allocator<std::shared_ptrantlr4::atn::ATNConfig > >&, bool, bool, int, bool) (ParserATNSimulator.cpp:942)
==27141== by 0x6E2FD8: antlr4::atn::ParserATNSimulator::closureCheckingStopState(std::shared_ptrantlr4::atn::ATNConfig const&, antlr4::atn::ATNConfigSet*, std::unordered_set<std::shared_ptrantlr4::atn::ATNConfig, antlr4::atn::ATNConfig::Hasher, antlr4::atn::ATNConfig::Comparer, std::allocator<std::shared_ptrantlr4::atn::ATNConfig > >&, bool, bool, int, bool) (ParserATNSimulator.cpp:873)
==27141== by 0x6E6205: antlr4::atn::ParserATNSimulator::closure(std::shared_ptrantlr4::atn::ATNConfig const&, antlr4::atn::ATNConfigSet*, std::unordered_set<std::shared_ptrantlr4::atn::ATNConfig, antlr4::atn::ATNConfig::Hasher, antlr4::atn::ATNConfig::Comparer, std::allocator<std::shared_ptrantlr4::atn::ATNConfig > >&, bool, bool, int, bool) (ParserATNSimulator.cpp:942)
==27141== by 0x6E2FD8: antlr4::atn::ParserATNSimulator::closureCheckingStopState(std::shared_ptrantlr4::atn::ATNConfig const&, antlr4::atn::ATNConfigSet*, std::unordered_set<std::shared_ptrantlr4::atn::ATNConfig, antlr4::atn::ATNConfig::Hasher, antlr4::atn::ATNConfig::Comparer, std::allocator<std::shared_ptrantlr4::atn::ATNConfig > >&, bool, bool, int, bool) (ParserATNSimulator.cpp:873)
==27141== by 0x6E6205: antlr4::atn::ParserATNSimulator::closure(std::shared_ptrantlr4::atn::ATNConfig const&, antlr4::atn::ATNConfigSet*, std::unordered_set<std::shared_ptrantlr4::atn::ATNConfig, antlr4::atn::ATNConfig::Hasher, antlr4::atn::ATNConfig::Comparer, std::allocator<std::shared_ptrantlr4::atn::ATNConfig > >&, bool, bool, int, bool) (ParserATNSimulator.cpp:942)
==27141== by 0x6E2FD8: antlr4::atn::ParserATNSimulator::closureCheckingStopState(std::shared_ptrantlr4::atn::ATNConfig const&, antlr4::atn::ATNConfigSet*, std::unordered_set<std::shared_ptrantlr4::atn::ATNConfig, antlr4::atn::ATNConfig::Hasher, antlr4::atn::ATNConfig::Comparer, std::allocator<std::shared_ptrantlr4::atn::ATNConfig > >&, bool, bool, int, bool) (ParserATNSimulator.cpp:873)
==27141== by 0x6E6205: antlr4::atn::ParserATNSimulator::closure(std::shared_ptrantlr4::atn::ATNConfig const&, antlr4::atn::ATNConfigSet*, std::unordered_set<std::shared_ptrantlr4::atn::ATNConfig, antlr4::atn::ATNConfig::Hasher, antlr4::atn::ATNConfig::Comparer, std::allocator<std::shared_ptrantlr4::atn::ATNConfig > >&, bool, bool, int, bool) (ParserATNSimulator.cpp:942)
==27141== by 0x6E2FD8: antlr4::atn::ParserATNSimulator::closureCheckingStopState(std::shared_ptrantlr4::atn::ATNConfig const&, antlr4::atn::ATNConfigSet*, std::unordered_set<std::shared_ptrantlr4::atn::ATNConfig, antlr4::atn::ATNConfig::Hasher, antlr4::atn::ATNConfig::Comparer, std::allocator<std::shared_ptrantlr4::atn::ATNConfig > >&, bool, bool, int, bool) (ParserATNSimulator.cpp:873)
==27141== by 0x6DF0F7: antlr4::atn::ParserATNSimulator::closure(std::shared_ptrantlr4::atn::ATNConfig const&, antlr4::atn::ATNConfigSet*, std::unordered_set<std::shared_ptrantlr4::atn::ATNConfig, antlr4::atn::ATNConfig::Hasher, antlr4::atn::ATNConfig::Comparer, std::allocator<std::shared_ptrantlr4::atn::ATNConfig > >&, bool, bool, bool) (ParserATNSimulator.cpp:818)
==27141== by 0x6E2A3F: antlr4::atn::ParserATNSimulator::computeStartState(antlr4::atn::ATNState*, antlr4::RuleContext*, bool) (ParserATNSimulator.cpp:593)
==27141== by 0x6E1F31: antlr4::atn::ParserATNSimulator::execATN(antlr4::dfa::DFA&, antlr4::dfa::DFAState*, antlr4::TokenStream*, unsigned long, antlr4::ParserRuleContext*) (ParserATNSimulator.cpp:219)
==27141== by 0x6E5666: antlr4::atn::ParserATNSimulator::adaptivePredict(antlr4::TokenStream*, unsigned long, antlr4::ParserRuleContext*) (ParserATNSimulator.cpp:138)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions