If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

WordcodeEmitter memory leak

RESOLVED WORKSFORME

Status

Tamarin
Interpreter
RESOLVED WORKSFORME
9 years ago
7 years ago

People

(Reporter: Tom Harwood, Assigned: Lars T Hansen)

Tracking

(Blocks: 1 bug)

unspecified
Future
x86
Windows XP

Details

(Reporter)

Description

9 years ago
Running sanity/class_ctor.as from the ASC test suite with a debug build.  Not sure if the verifier error is expected output or not:

caught exception: VerifyError: Error #1063: Argument count mismatch on A(). Expected 1, got 0.
Leaked 24 byte item.  Addr: 0x00CD7078


	MMgc::GCHeap::AllocHook(gcheap.cpp:1445) - 0x4dfa74
	MMgc::FixedAlloc::Alloc(fixedalloc.cpp:161) - 0x4dc799
	MMgc::FixedAllocSafe::Alloc(fixedalloc.h:143) - 0x403018
	MMgc::FixedMalloc::Alloc(fixedmalloc.h:66) - 0x402f65
	operator new[](gcglobalnew.h:70) - 0x408b3a
	avmplus::WordcodeEmitter::boot(wordcodeemitter.cpp:116) - 0x4ae126
	avmplus::WordcodeEmitter::WordcodeEmitter(wordcodeemitter.cpp:80) - 0x4ae077
	avmplus::MethodInfo::verify(methodinfo.cpp:229) - 0x44cce1
	avmplus::MethodInfo::verifyEnter(methodinfo.cpp:165) - 0x44cb02
	avmplus::MethodEnv::endCoerce(methodenv.cpp:251) - 0x45599b
	avmplus::MethodEnv::coerceUnboxEnter(methodenv.cpp:445) - 0x45119e
	avmplus::MethodEnv::coerceEnter(methodenv.cpp:429) - 0x451052
	avmplus::ClassClosure::construct(classclosure.cpp:121) - 0x41d06b
	avmplus::Toplevel::op_construct(toplevel.cpp:250) - 0x4207a5
	avmplus::Toplevel::constructprop(toplevel.cpp:615) - 0x42131f

Assertion failed: "((false))" (".\\FixedAlloc.cpp":91)
(Reporter)

Comment 1

9 years ago
Looked at the test output again: the 1063 error is expected.
The leaked item is WordcodeEmitter::caches, which doesn't look leaky on a quick inspection.
(Assignee)

Comment 2

9 years ago
There might be a problem in MethodInfo::verify.  If that throws an exception then the stack-allocated WordcodeEmitter will not be deleted properly, which means it will not clean up its heap-allocated memory.

One fix would presumably be to make the WordcodeEmitter a GCFinalizableObject so that its destructor is always run.
(Assignee)

Updated

8 years ago
Blocks: 517445
(Assignee)

Updated

8 years ago
Target Milestone: --- → Future
(Assignee)

Updated

8 years ago
Assignee: nobody → lhansen
(Assignee)

Updated

8 years ago
Assignee: lhansen → nobody

Comment 3

7 years ago
still valid?

Updated

7 years ago
Component: Virtual Machine → Interpreter
(Assignee)

Updated

7 years ago
Assignee: nobody → lhansen
(Assignee)

Comment 4

7 years ago
Tested and observed no leak.  Plus, WordcodeEmitter::caches is no longer there, and MethodInfo::verify is gone too.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → WORKSFORME
Duplicate of this bug: 590002
You need to log in before you can comment on or make changes to this bug.