Closed
Bug 480029
Opened 16 years ago
Closed 16 years ago
mmgc should print a message when is low on memory or out of memory before exiting with 128
Categories
(Tamarin Graveyard :: Virtual Machine, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: dschaffe, Assigned: lhansen)
References
Details
Attachments
(1 file)
792 bytes,
patch
|
stejohns
:
review+
|
Details | Diff | Splinter Review |
The OOM handler exits gracefully from the vm shell with an exit code of 128. Can the handler print low memory warning or out of memory warning to exercise the callback mechanism?
Flags: flashplayer-triage+
Updated•16 years ago
|
Flags: in-testsuite?
Reporter | ||
Comment 2•16 years ago
|
||
OOM exit code 128 is not in the automated buildbot acceptance tests. I have a script (replace AVM with python script) to run an abc calculating the minimum memory before the test stops working. The script sets heaplimit at and below the minimum memory testing 128 exit code is returned and not a SEGFAULT or value besides 0 is returned. It is tested 1-off. I could experiment with adding acceptance test to set low heap limit and allocate a bunch of memory in the acceptance tests. Would not be as exhaustive as running every acceptance tests.
Flags: in-testsuite? → in-testsuite-
Assignee | ||
Updated•16 years ago
|
Assignee: nobody → lhansen
Assignee | ||
Comment 3•16 years ago
|
||
The OOM mechanism in MMgc already prints "out of memory" using the GCLog mechanism, but that may be diverted or throttled in various ways.
This patch catches the error in the toplevel "main" function and prints a message (using no additional memory) "OUT OF MEMORY" before termination.
Since there is no console on Win32 or WinMo, this patch does not apply to those platforms.
Attachment #385770 -
Flags: review?(stejohns)
Comment 4•16 years ago
|
||
Comment on attachment 385770 [details] [diff] [review]
For Mac and Unix
Might be useful to have Win32/WinCE write a similar message with OutputDebugStringA().
Attachment #385770 -
Flags: review?(stejohns) → review+
Assignee | ||
Comment 5•16 years ago
|
||
(In reply to comment #4)
> (From update of attachment 385770 [details] [diff] [review])
> Might be useful to have Win32/WinCE write a similar message with
> OutputDebugStringA().
The implementation of VMPI_log appears to indicate that this function is not available on CE, but I'll add it on Windows desktop. Don't know if I can count on it using no dynamically allocated memory but I guess I'll take my chances.
Assignee | ||
Comment 6•16 years ago
|
||
OutputDebugStringW appears to work on WinMo (with an L"whatever" string).
Comment 7•16 years ago
|
||
right, CE is unicode-only.
Assignee | ||
Comment 8•16 years ago
|
||
redux changeset: 2069:4b5ca7ca1b15
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 9•15 years ago
|
||
verified fixed. shell prints message "error: out of memory" to stdout when oom happens.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•