Skip to content

Stray One command leads to ParseFail(NoCurrentOp) #289

@martin-hughes

Description

@martin-hughes

This sounds daft, but there's a large number (~40) of uACPI dumps that have a One opcode just floating by itself. Which leads inevitably to ParseFail(NoCurrentOp).

For example, dump 8C21F14AD994 has this snippet in its decompilation:

line 1111 onwards:
    External (TBTF, MethodObj)    // 1 Arguments
    External (XBAS, UnknownObj)

    Name (SS1, 0x00)
    Name (SS2, 0x00)
    Name (SS3, One)
    One // <- Stray
    Name (SS4, One)
    One // <- Stray
    OperationRegion (GNVS, SystemMemory, 0x8FF4F000, 0x0792)
    Field (GNVS, AnyAcc, Lock, Preserve)
    {
(etc.)

(I've added the comments // <- Stray)

Why are those One commands there? Who knows... iasl won't even compile a snippet like that! But it crashes the parser.

Sadly being unable to compile this in iasl makes it hard to test. Might need a bit more test infrastructure 🤓

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions