[libFuzzer] make libFuzzer work with a bit older clang versions

llvm-svn: 277941
This commit is contained in:
Kostya Serebryany 2016-08-06 21:28:56 +00:00
parent 2a90c06b02
commit de06df6edd

View File

@ -123,15 +123,17 @@ class CoverageController {
C->PcMapBits = NewPcMapBits;
}
uint64_t NewPcBufferPos = EF->__sanitizer_get_coverage_pc_buffer_pos();
if (NewPcBufferPos > C->PcBufferPos) {
Res = true;
C->PcBufferPos = NewPcBufferPos;
}
if (EF->__sanitizer_get_coverage_pc_buffer_pos) {
uint64_t NewPcBufferPos = EF->__sanitizer_get_coverage_pc_buffer_pos();
if (NewPcBufferPos > C->PcBufferPos) {
Res = true;
C->PcBufferPos = NewPcBufferPos;
}
if (PcBufferLen && NewPcBufferPos >= PcBufferLen) {
Printf("ERROR: PC buffer overflow\n");
_Exit(1);
if (PcBufferLen && NewPcBufferPos >= PcBufferLen) {
Printf("ERROR: PC buffer overflow\n");
_Exit(1);
}
}
return Res;