Research Article
StFuzzer: Contribution-Aware Coverage-Guided Fuzzing for Smart Devices
Algorithm 1
Calculate expection of basic blocks in a loop structure.
| Input: B: the set of visited basic blocks | B: the set of visited basic blocks | Output: Calculating the expectation of each basic blocks | (1) | if Succ then | (2) | if jumpweight then | (3) | temp = weight ÷ (Weight − jumpweight | (4) | for each block pred (succ ) do | (5) | jumpweight = temp jumpweight | (6) | end for | (7) | jumpweight = −1 | (8) | remove | (9) | add | (10) | else | (11) | add | (12) | end if | (13) | else | (14) | add | (15) | add | (16) | end if |
|