Bug 5389

Summary: Unexpected dereference of Index reference immediately passed to Method
Product: ACPI Reporter: Valery A Podrezov (Valery.A.Podrezov)
Component: ACPICA-CoreAssignee: Lin Ming (ming.m.lin)
Status: CLOSED CODE_FIX    
Severity: normal CC: acpi-bugzilla
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6 Subsystem:
Regression: --- Bisected commit-id:
Attachments: ASL code to reproduce bug.
proposed patch

Description Valery A Podrezov 2005-10-07 07:56:22 UTC
Most recent kernel where this bug did not occur:
Distribution:
Hardware Environment:
Software Environment:
Problem Description:

The Linux kernel ACPI interpreter fails the following
AML test when it is compiled into a simulator. So if an
OEM BIOS includes this code, Linux would fail.

Steps to reproduce:

Run interpreter with the .asl demo code attached below.
Comment 1 Valery A Podrezov 2005-10-07 07:58:59 UTC
Created attachment 6251 [details]
ASL code to reproduce bug.

The attached program demonstrates both ways to pass reference -
to pass it immediately to Method and store at first to Local and
then only pass it to Method by Local. The output of demo shows
that the references (Index references) passed to Method by the
first way are visible from inside Method as objects but not
references to them. And that is wrong.

They should remain references (as in second way) and the
following access to them (from inside Method) could be performed
either by DerefOf (Read access) or without applying DerefOf
(taking into account the Read/Write access automatic dereference).


INTERNAL BUG NUMBER

   113
Comment 2 Lin Ming 2007-10-10 20:34:26 UTC
This bug still exist at ACPICA-v20070912
Comment 3 Lin Ming 2007-11-05 05:57:29 UTC
Created attachment 13399 [details]
proposed patch 

If method call - leave the Reference on the stack
Comment 4 Lin Ming 2007-11-05 17:30:07 UTC
*** Bug 5390 has been marked as a duplicate of this bug. ***
Comment 5 Len Brown 2008-04-30 20:51:22 UTC
shipped in linux-2.6.25-git16
e5bcc811f78f294e7be8a0721b3fb513028c5af4
ACPICA: Fixed a problem with Index references passed as method arguments