diff options
Diffstat (limited to 'source/components/parser/psobject.c')
-rw-r--r-- | source/components/parser/psobject.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/components/parser/psobject.c b/source/components/parser/psobject.c index 8d2448bd8d41..5d59492a7ba8 100644 --- a/source/components/parser/psobject.c +++ b/source/components/parser/psobject.c @@ -237,12 +237,23 @@ AcpiPsGetAmlOpcode ( WalkState->Opcode, (UINT32) (AmlOffset + sizeof (ACPI_TABLE_HEADER))); + ACPI_ERROR ((AE_INFO, + "Aborting disassembly, AML byte code is corrupt")); + /* Dump the context surrounding the invalid opcode */ AcpiUtDumpBuffer (((UINT8 *) WalkState->ParserState.Aml - 16), 48, DB_BYTE_DISPLAY, (AmlOffset + sizeof (ACPI_TABLE_HEADER) - 16)); AcpiOsPrintf (" */\n"); + + /* + * Just abort the disassembly, cannot continue because the + * parser is essentially lost. The disassembler can then + * randomly fail because an ill-constructed parse tree + * can result. + */ + return_ACPI_STATUS (AE_AML_BAD_OPCODE); #endif } @@ -458,6 +469,10 @@ AcpiPsCreateOp ( { return_ACPI_STATUS (AE_CTRL_PARSE_CONTINUE); } + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } /* Create Op structure and append to parent's argument list */ |