Bug 5427 - Releasing memory of the inside Method scopes surrounding Return operation is needed
Summary: Releasing memory of the inside Method scopes surrounding Return operation is ...
Status: CLOSED CODE_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: ACPICA-Core (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Valery A Podrezov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-12 10:36 UTC by Valery A Podrezov
Modified: 2006-09-28 13:10 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
ASL code applying Return from surrounding scopes. (2.20 KB, text/plain)
2005-10-12 10:37 UTC, Valery A Podrezov
Details
Proposed patch (1.01 KB, patch)
2005-12-15 09:27 UTC, Valery A Podrezov
Details | Diff

Description Valery A Podrezov 2005-10-12 10:36:26 UTC
Most recent kernel where this bug did not occur:
Distribution:
Hardware Environment:
Software Environment:
Problem Description:

The "memory leak" bug.
The issue has been revealed by PMEMCV, is not seen by OAS (see bug 5422).
Investigation shows that when the Return operation is performed
from the inside Method scopes surrounding that Return operation
(If, While, Switch, etc..) the memory allocations related to those
scopes are not immediately released (though them are released later
in AcpiDsDeleteWalkState()). This puts obstacles in the way of PMEMCV
development. In order to identify new anomalies by means of PMEMCV
(without complicating that instrumentation) the old anomalies being
already identified should be eliminated before that.

When the new scope opening AML operators (If, While, etc..) are
processed uninterruptedly (no Return) the memory utilized during
interpretation of them is released properly (immediately, just
after completion of each of them).

Steps to reproduce:

Doesn't require.
Comment 1 Valery A Podrezov 2005-10-12 10:37:51 UTC
Created attachment 6291 [details]
ASL code applying Return from surrounding scopes.

The attached demo program applies in different manner
the Return operation from surrounding scopes.

INTERNAL BUG NUMBER

   166
Comment 2 Valery A Podrezov 2005-12-15 09:27:48 UTC
Created attachment 6834 [details]
Proposed patch

The update was tested by the ASLTS test suite runs
(all the test cases) on the following systems:

- CYGWIN_NT-5.1 1.5.18(0.132/4/2) 2005-07-02 20:30 i686 unknown unknown Cygwin
- Linux 2.6.5-7.191-smp #1 SMP Tue Jun 28 14:58:56 UTC 2005 i686 i686 i386
GNU/Linux

for the following (all) modes supported by the ASLTS test suite:

- 32-bit norm mode
- 64-bit norm mode
- 32-bit slack mode
- 32-bit slack mode

The tests were run (on the systems described above) before update,
then the tests were run on those systems after update. Then results
of two runs were compared. All is Ok (the relevant error fixed, no
new errors).
Comment 3 Robert Moore 2006-02-10 14:23:32 UTC
Released in ACPICA version 20060210
Comment 4 Robert Moore 2006-02-17 10:06:48 UTC
Release slipped out to 20060217
Comment 5 Len Brown 2006-06-25 21:59:14 UTC
ACPICA 20060608 shipped in Linux-2.6.17-git9, closed. 

Note You need to log in before you can comment on or make changes to this bug.