blob: 3aa56c4ef657f36adefaa3f46c1f373d74207d48 [file] [log] [blame]
Kostya Serebryany31516732016-03-24 01:32:08 +00001// Test with a leak.
2#include <cstdint>
3#include <cstddef>
4
5static volatile int *Sink;
6
7extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
8 if (!Size) return 0;
9 Sink = new int;
10 Sink = new int;
11 while (Sink) *Sink = 0; // Infinite loop.
12 return 0;
13}
14