PR# 13730 Second call to `eif_alloc_init' may change memory parameters

Problem Report Summary
Submitter: prestoat2000
Category: Runtime
Priority: Medium
Date: 2007/12/07
Class: Bug
Severity: Serious
Number: 13730
Release: 6.1.71424
Confidential: No
Status: Open
Responsible:
Environment: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.8.1.5) Gecko/20070719 Firefox/2.0.0.5 Solaris 10 on x86
Synopsis: Second call to `eif_alloc_init' may change memory parameters

Description
I can't tell whether this is serious since it is unclear to me when 
`eif_alloc_init' may be called more than once, except in the CECIL case where
EIF_INITIALIZE is called more than once.  But since the author took pains to
try to not change memory parameters if they have already been set (by checking
values of static variables), I thought I should point out that some memory
parameters can be set to different values on the second call of `eif_alloc_init'.

Two things allow a memory parameter to get a different value if the
corresponding environment variable has been changed between the first and
second call:

1. The original value specified was 0 and no bigger minimum was imposed
   by the code, so zero was accepted (such as EIF_TENURE_MAX).

2. Even in cases where a minimum bigger than 0 was imposed, if it was
   imposed on the global instead of the static local, and if the original
   user-specified value was 0 then the static local will still be 0
   on the second call, so a new (and possibly different) memory parameter
   value will be computed.  Example: EIF_MEMORY_THRESHOLD.

I will let you decide whether this possible changed of memory parameter matters.
To Reproduce

										
Problem Report Interactions