Skip to content

String equality checking wrong - only checks 4 bytes? #297

@martin-hughes

Description

@martin-hughes

I haven't had a chance to fully investigate yet, but consider the following ASL:

DefinitionBlock("", "DSDT", 1, "RSACPI", "StrEqual", 1) {
    Method(MAIN, 0, NotSerialized) {
        Local0 = "Hello"
        Local1 = "Hellp"

        Return(Local0 == Local1)
    }
}

This test should pass - remember that a zero result indicates success - but it actually doesn't.

From a bit of playing, the parser seems to think (with the logic the correct way around again)

  • "Hello" == "Hellp"
  • "Hello" == "Hell",
  • "Hello" != "Help"

Which leads me to think it's only comparing the first 4 bytes (or possibly "integer-size" number of bytes)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions