ART: Fix graph for switch leaving a try block
Blocks that GraphBuilder creates for switch-case logic are given
a dex_pc of the branch targets they serve, while in fact they should
be considered part of the switch instruction itself and get its pc.
This caused the try/catch algorithm to either miss try boundaries or
create bogus edges.
This patch fixed the dex_pc of the switch-case blocks and modifies
the try/catch logic to iterate over all blocks as opposed to just
branch targets since multiple blocks can now cover the same dex_pc.
2 files changed