forked from pmem/syscall_intercept
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ASAN related workaround in hook_test
Ref: pmem#7 While executing ASAN builds, some unexpected syscalls are observed. These can not be predicted, so this patch attempts to filter them out. Also, the return value of the function named hook in test/hook_test_preload.c is changed to 7 from 99. This also helps with ASAN builds: ASAN reads the buffers passed write syscalls, after they return. Due to this, an ASAN error was triggered every time it tried to read dummy_data buffer's contents, which has fewer than 99 bytes.
- Loading branch information
Showing
4 changed files
with
54 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
$(S) $(XX) -- syscall(9999, $(XX), $(XX), $(XX), $(XX), $(XX), $(XX)) = ? | ||
$(S) $(XX) -- syscall(9999, $(XX), $(XX), $(XX), $(XX), $(XX), $(XX)) = $(N) | ||
$(S) $(XX) -- write(1, "dummy_data\0", 11) = ? | ||
$(S) $(XX) -- write(1, "dummy_data\0", 11) = 99 | ||
$(S) $(XX) -- write(1, "dummy_data\0", 11) = 7 | ||
$(S) $(XX) -- write(1, "thin", 4) = ? | ||
$(S) $(XX) -- write(1, "thin", 4) = 4 | ||
$(S) $(XX) -- write(1, "dummy_data\0", 11) = ? | ||
$(S) $(XX) -- write(1, "dummy_data\0", 11) = 99 | ||
$(S) $(XX) -- write(1, "dummy_data\0", 11) = 7 | ||
$(S) $(XX) -- syscall(9999, $(XX), $(XX), $(XX), $(XX), $(XX), $(XX)) = ? | ||
$(S) $(XX) -- syscall(9999, $(XX), $(XX), $(XX), $(XX), $(XX), $(XX)) = $(N) |