dascandy / hippomocks

GNU Lesser General Public License v2.1
196 stars 67 forks source link

FIX: restore backups in reverse order #99

Closed y0lo closed 5 years ago

y0lo commented 5 years ago

Issue: If the tested function is less than 16 bytes and is not aligned. And nearby function (the beginning of the next function is located with the following address) is tests: In the backup will be copied replaced instruction and will be incorrectly restored. Next native call of the function will cause "segmentation fault".

y0lo commented 5 years ago

Added unit tests for the issue. To check the effect just build it without changes within "HippoMocks/hippomocks.h"

dascandy commented 5 years ago

Thanks for the fix!