Skip to content

windows x64 exception data is innacurate #46803

Open
@jwitmann

Description

@jwitmann
Bugzilla Link 47459
Version unspecified
OS Windows NT
Attachments fix for wrong $ip2state records.
CC @majnemer,@rnk

Extended Description

Hi,

While I was scrutinizing some generated code inside IDA PRO, I realized the $ip2state records are wrong by 1 byte... which in turn make the disassembler display the wrong start for try[]. This is bad, as it would dispatch the wrong exception handler if an error happens on the 1st instruction.

I spent some time and found that the source of the problem is WinException::getLabel() used in computeIP2StateTable. While the function correctly build a label plus 1 for other EH table uses, in computeIP2StateTable it should really not add 1. So I create a new function that just does that and it resolved the issue.

I attach a patch... I don't really have time to do more than this, nor can i provide a test file.

Best regards,
Jerome WITMANN

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions