[PATCH] D27179: LibFuzzer - Implement timers for Windows and improve synchronization.
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 29 09:54:19 PST 2016
zturner added inline comments.
================
Comment at: lib/Fuzzer/FuzzerUtil.h:47-54
+ HandlerT sigalrm_cb;
+ HandlerT sigsegv_cb;
+ HandlerT sigbus_cb;
+ HandlerT sigabrt_cb;
+ HandlerT sigill_cb;
+ HandlerT sigfpe_cb;
+ HandlerT sigint_cb;
----------------
How about getting rid of the constructor and initializing all these inline?
```
int timeout = 0;
HandlerT sigalrm_cb = nullptr;
// etc
```
================
Comment at: lib/Fuzzer/FuzzerUtilWindows.cpp:30
-LONG WINAPI SEGVHandler(PEXCEPTION_POINTERS ExceptionInfo) {
+static SignalHandlerOptions HandlerOpt;
+
----------------
@kcc: Are there any issues with using static global constructors in libfuzzer?
================
Comment at: lib/Fuzzer/FuzzerUtilWindows.cpp:89-90
+ ~TimerQ() {
+ if (TimerQueue)
+ DeleteTimerQueueEx(TimerQueue, NULL);
+ };
----------------
Shouldn't use all delete the timer as well? You store it locally in `SetTimer` but then let the handle leak. So every time we call `SetTimer` it will leak a handle.
Repository:
rL LLVM
https://reviews.llvm.org/D27179
More information about the llvm-commits
mailing list