PR# 13760 Garbage collection can be left off if fail to allocate memory or receive a signal
Problem Report Summary
Submitter: prestoat2000
Category: Runtime
Priority: Medium
Date: 2007/12/13
Class: Bug
Severity: Serious
Number: 13760
Release: 6.1.71498
Confidential: No
Status: Open
Responsible:
Environment: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.8.0.7) Gecko/20060915 Firefox/1.5.0.7
Solaris 9 on SPARC
Synopsis: Garbage collection can be left off if fail to allocate memory or receive a signal
Description
If a run-time routine fails to allocate memory, garbage collection can be left off in some circumstances. For example, in pstore.c routine `parsing_store_append', the call to `traversal' can raise an exception if it fails to allocate memory. If this happens and GC was on at entry to `parsing_store_append', it appears (based on code inspection) that GC will remain off. Another example is in routine `ediso' in equal.c. If a memory allocation fails after GC is turned off (or if a signal is delivered and handler does a longjmp - doesn't look like signals are blocked at this point), then GC will remain off. Perhaps you need a generic mechanism to deal with this kind of problem. There may be other similar cases, which can be found by searching the run-time code for "gc_ison" and if GC is turned off, verifying that it is always turned back on, even if an exception is raised. You can also search for "rt_g_data.status" to find other possible areas of code that need to be checked.
To Reproduce
Problem Report Interactions