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

valgrind reports memory leak at assembler.cc:178 #2228

Closed
a-siva opened this issue Mar 19, 2012 · 4 comments
Closed

valgrind reports memory leak at assembler.cc:178 #2228

a-siva opened this issue Mar 19, 2012 · 4 comments
Assignees
Labels
area-vm P3 A lower priority bug or feature request

Comments

@a-siva
Copy link
Contributor

a-siva commented Mar 19, 2012

==1889==
==1889== 44 bytes in 2 blocks are definitely lost in loss record 100 of 119
==1889== at 0x4DB2E1E: malloc (/home/samsonov/valgrind-variant/valgrind-test/coregrind/m_replacemalloc/vg_replace_malloc.c:263)
==1889== by 0x81BAA1F: dart::Assembler::Unreachable(char const*) (/workspace/asiva/dart-tot/dart/frog/../runtime/vm/assembler.cc:178)
==1889== by 0x813EE16: dart::OptimizingCodeGenerator::GenerateLogicalBinaryOp(dart::BinaryOpNode*) (/workspace/asiva/dart-tot/dart/frog/../runtime/vm/opt_code_generator_ia32.cc:1318)
==1889== by 0x8147F9E: dart::OptimizingCodeGenerator::VisitBinaryOpNode(dart::BinaryOpNode*) (/workspace/asiva/dart-tot/dart/frog/../runtime/vm/opt_code_generator_ia32.cc:1350)
==1889== by 0x81C8077: dart::BinaryOpNode::Visit(dart::AstNodeVisitor*) (/workspace/asiva/dart-tot/dart/frog/../runtime/vm/ast.cc:18)
==1889== by 0x813E829: dart::OptimizingCodeGenerator::VisitLoadOne(dart::AstNode*, dart::Register) (/workspace/asiva/dart-tot/dart/frog/../runtime/vm/opt_code_generator_ia32.cc:457)
==1889== by 0x813EDD6: dart::OptimizingCodeGenerator::GenerateLogicalBinaryOp(dart::BinaryOpNode*) (/workspace/asiva/dart-tot/dart/frog/../runtime/vm/opt_code_generator_ia32.cc:1314)
==1889== by 0x8147F9E: dart::OptimizingCodeGenerator::VisitBinaryOpNode(dart::BinaryOpNode*) (/workspace/asiva/dart-tot/dart/frog/../runtime/vm/opt_code_generator_ia32.cc:1350)
==1889== by 0x81C8077: dart::BinaryOpNode::Visit(dart::AstNodeVisitor*) (/workspace/asiva/dart-tot/dart/frog/../runtime/vm/ast.cc:18)
==1889== by 0x8138612: dart::OptimizingCodeGenerator::VisitIfNode(dart::IfNode*) (/workspace/asiva/dart-tot/dart/frog/../runtime/vm/opt_code_generator_ia32.cc:2715)
==1889== by 0x81C8177: dart::IfNode::Visit(dart::AstNodeVisitor*) (/workspace/asiva/dart-tot/dart/frog/../runtime/vm/ast.cc:18)
==1889== by 0x8137F18: dart::OptimizingCodeGenerator::VisitSequenceNode(dart::SequenceNode*) (/workspace/asiva/dart-tot/dart/frog/../runtime/vm/opt_code_generator_ia32.cc:3083)
==1889==

@iposva-google
Copy link
Contributor

This has always been an issue with these memory tools, they do not recognize pointers in generated code. Another problem is that when we release memory owned by a RawInstruction object the malloc blocks corresponding to Stop messages is not released. One solution would be to add the Stop message inline within the code.


Removed Priority-Medium label.
Added Priority-Low, Accepted labels.

@a-siva
Copy link
Contributor Author

a-siva commented Sep 10, 2012

These allocated blocks are used in generated code. The real issue as indicated by Ivan
is that we do not release these blocks when the RawInstruction object is released.

These Stop messages are typically used only under debug code.


Added this to the Later milestone.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@a-siva a-siva added Type-Defect P3 A lower priority bug or feature request area-vm labels Aug 4, 2014
@a-siva a-siva self-assigned this Aug 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm P3 A lower priority bug or feature request
Projects
None yet
Development

No branches or pull requests

3 participants