[PATCH] D42670: [fuzzer] Update and enable libFuzzer on Fuchsia
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 30 15:01:54 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL323828: [fuzzer] Update and enable libFuzzer on Fuchsia (authored by phosek, committed by ).
Herald added a subscriber: delcypher.
Changed prior to commit:
https://reviews.llvm.org/D42670?vs=131893&id=132059#toc
Repository:
rL LLVM
https://reviews.llvm.org/D42670
Files:
compiler-rt/trunk/cmake/config-ix.cmake
compiler-rt/trunk/lib/fuzzer/FuzzerUtilFuchsia.cpp
Index: compiler-rt/trunk/lib/fuzzer/FuzzerUtilFuchsia.cpp
===================================================================
--- compiler-rt/trunk/lib/fuzzer/FuzzerUtilFuchsia.cpp
+++ compiler-rt/trunk/lib/fuzzer/FuzzerUtilFuchsia.cpp
@@ -56,7 +56,7 @@
void CrashHandler(zx::port *Port) {
std::unique_ptr<zx::port> ExceptionPort(Port);
zx_port_packet_t Packet;
- ExceptionPort->wait(ZX_TIME_INFINITE, &Packet, 0);
+ ExceptionPort->wait(zx::time::infinite(), &Packet, 0);
// Unbind as soon as possible so we don't receive exceptions from this thread.
if (zx_task_bind_exception_port(ZX_HANDLE_INVALID, ZX_HANDLE_INVALID,
kFuzzingCrash, 0) != ZX_OK) {
@@ -117,7 +117,7 @@
}
void SleepSeconds(int Seconds) {
- zx::nanosleep(zx::deadline_after(ZX_SEC(Seconds)));
+ zx::nanosleep(zx::deadline_after(zx::sec(Seconds)));
}
unsigned long GetPid() {
@@ -200,7 +200,7 @@
zx::process Process(ProcessHandle);
// Now join the process and return the exit status.
- if ((rc = Process.wait_one(ZX_PROCESS_TERMINATED, ZX_TIME_INFINITE,
+ if ((rc = Process.wait_one(ZX_PROCESS_TERMINATED, zx::time::infinite(),
nullptr)) != ZX_OK) {
Printf("libFuzzer: failed to join '%s': %s\n", Argv[0],
zx_status_get_string(rc));
Index: compiler-rt/trunk/cmake/config-ix.cmake
===================================================================
--- compiler-rt/trunk/cmake/config-ix.cmake
+++ compiler-rt/trunk/cmake/config-ix.cmake
@@ -604,7 +604,7 @@
endif()
if (COMPILER_RT_HAS_SANITIZER_COMMON AND FUZZER_SUPPORTED_ARCH AND
- OS_NAME MATCHES "Android|Darwin|Linux|NetBSD|FreeBSD")
+ OS_NAME MATCHES "Android|Darwin|Linux|NetBSD|FreeBSD|Fuchsia")
set(COMPILER_RT_HAS_FUZZER TRUE)
else()
set(COMPILER_RT_HAS_FUZZER FALSE)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42670.132059.patch
Type: text/x-patch
Size: 1827 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180130/7076f20c/attachment.bin>
More information about the llvm-commits
mailing list