Bug 5389 - Unexpected dereference of Index reference immediately passed to Method
Summary: Unexpected dereference of Index reference immediately passed to Method
Status: CLOSED CODE_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: ACPICA-Core (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Lin Ming
URL:
Keywords:
: 5390 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-10-07 07:56 UTC by Valery A Podrezov
Modified: 2008-04-30 20:51 UTC (History)
1 user (show)

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


Attachments
ASL code to reproduce bug. (894 bytes, text/plain)
2005-10-07 07:58 UTC, Valery A Podrezov
Details
proposed patch (2.54 KB, patch)
2007-11-05 05:57 UTC, Lin Ming
Details | Diff

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

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