-
Notifications
You must be signed in to change notification settings - Fork 478
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into ek/fix-concretize-syscall-args
* master: Remove Keystone from existing tests (#1684) Change URL for WASM spec (#1702) Overhaul Linux file emulation (#1673)
- Loading branch information
Showing
19 changed files
with
2,685 additions
and
278 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// This example demonstrates a particular syscall that fails at runtime. | ||
// Used primarily as a test of Manticore's file-related syscall implementation. | ||
|
||
#include <errno.h> | ||
#include <stdio.h> | ||
#include <string.h> | ||
#include <stropts.h> | ||
#include <sys/socket.h> | ||
|
||
int main() { | ||
// try bogus ioctl on a non-open file descriptor | ||
int rc = ioctl(42, I_FLUSH, FLUSHRW); | ||
if (rc == -1) { | ||
fprintf(stderr, "got expected error: %s\n", strerror(errno)); | ||
return 0; | ||
} else { | ||
fprintf(stdout, "unexpectedly succeeded!\n"); | ||
return 1; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// This example demonstrates a particular syscall that fails at runtime. | ||
// Used primarily as a test of Manticore's file-related syscall implementation. | ||
|
||
#include <errno.h> | ||
#include <stdio.h> | ||
#include <string.h> | ||
#include <stropts.h> | ||
#include <sys/socket.h> | ||
|
||
int main() { | ||
// try bogus ioctl on a socket | ||
int sockfd = socket(AF_INET, SOCK_STREAM, 0); | ||
if (sockfd < 0) { | ||
fprintf(stderr, "error opening socket: %s\n", strerror(errno)); | ||
return 1; | ||
} | ||
|
||
int rc = ioctl(sockfd, I_FLUSH, FLUSHRW); | ||
if (rc == -1) { | ||
fprintf(stderr, "got expected error calling ioctl: %s\n", strerror(errno)); | ||
return 0; | ||
} else { | ||
fprintf(stdout, "unexpectedly succeeded!\n"); | ||
return 2; | ||
} | ||
} |
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
Oops, something went wrong.