Fix switch table detection. Disassemble all instructions in non-simple functions.
Summary: Switch table can contain __builtin_unreachable(). As a result, a compiler may place an entry into a jump table that contains an address immediately past the last instruction in the function. Sometimes it may coincide with a start of the next function in the binary. Thus when we check for switch tables in such cases we have to check more than a single entry until we see either an address inside containing function or some address outside different from the address past the last instruction. Additonally, don't stop disassembly after discovering that the function was not simple. We need to detect all outside references whenever possible. (cherry picked from FBD3850825)
Loading
Please sign in to comment