Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initialize ir->branch_table->PC with safe value
If the ra(return address) is 0x0, the LOOKUP_OR_UPDATE_BRANCH_HISTORY_TABLE will bahave abnormally since calloc initialize ir->branch_table->PC[i] to 0x0. The 0x0 address might be not yet translated to a valid block, thus ir->branch_table->target[i] might be NULL, calling a NULL function pointer cause segmentation fault. It can be solved by initializing ir->branch_table->PC will other value than 0x0. Here, I choose unsigned integer of -1. Close #461
- Loading branch information