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

Memory leak at src/ast/datatype_decl_plugin.cpp:126 #5279

Closed
rainoftime opened this issue May 19, 2021 · 0 comments
Closed

Memory leak at src/ast/datatype_decl_plugin.cpp:126 #5279

rainoftime opened this issue May 19, 2021 · 0 comments

Comments

@rainoftime
Copy link
Contributor

rainoftime commented May 19, 2021

Hi, for the following formula
z3 7b3a587

(declare-datatypes ((T 1)) (((Map (m (Array Int (T Int)))))))
=================================================================
==51847==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 40 byte(s) in 1 object(s) allocated from:
    #0 0x7f121891d662 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98662)
    #1 0x283b6fb in memory::allocate(unsigned long) ../src/util/memory_manager.cpp:273
    #2 0x283b21e in memory::allocate(char const*, int, char const*, unsigned long) ../src/util/memory_manager.cpp:212
    #3 0x243efe1 in datatype::param_size::size::mk_offset(sort_size const&) ../src/ast/datatype_decl_plugin.cpp:126
    #4 0x244757c in datatype::util::get_sort_size(ref_vector<sort, ast_manager> const&, sort*) ../src/ast/datatype_decl_plugin.cpp:765
    #5 0x244775d in datatype::util::get_sort_size(ref_vector<sort, ast_manager> const&, sort*) ../src/ast/datatype_decl_plugin.cpp:778
    #6 0x244840c in datatype::util::compute_datatype_size_functions(svector<symbol, unsigned int> const&) ../src/ast/datatype_decl_plugin.cpp:846
    #7 0x2443e6b in datatype::decl::plugin::end_def_block() ../src/ast/datatype_decl_plugin.cpp:472
    #8 0x2445489 in datatype::decl::plugin::mk_datatypes(unsigned int, datatype::def* const*, unsigned int, sort* const*, ref_vector<sort, ast_manager>&) ../src/ast/datatype_decl_plugin.cpp:541
    #9 0x1b33a11 in pdatatype_decl::commit(pdecl_manager&) ../src/cmd_context/pdecl.cpp:647
    #10 0x1af47bf in smt2::parser::parse_declare_datatypes() ../src/parsers/smt2/smt2parser.cpp:906
    #11 0x1b0bade in smt2::parser::parse_cmd() ../src/parsers/smt2/smt2parser.cpp:2977
    #12 0x1b0d063 in smt2::parser::operator()() ../src/parsers/smt2/smt2parser.cpp:3141
    #13 0x1aebcd0 in parse_smt2_commands(cmd_context&, std::istream&, bool, params_ref const&, char const*) ../src/parsers/smt2/smt2parser.cpp:3190
    #14 0x43ede7 in read_smtlib2_commands(char const*) ../src/shell/smtlib_frontend.cpp:142
    #15 0x466d6a in main ../src/shell/main.cpp:372
    #16 0x7f12179b983f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2083f)

SUMMARY: AddressSanitizer: 40 byte(s) leaked in 1 allocation(s).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant