Skip to content

Commit 690ada5

Browse files
authored
Oss-fuzz ideal integration (unicorn-engine#1265)
* Adds oss-fuzz badge * Generic fix for watchpoints leak
1 parent 17cfef0 commit 690ada5

File tree

3 files changed

+2
-1
lines changed

3 files changed

+2
-1
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Unicorn Engine
44
[![Join the chat at https://gitter.im/unicorn-engine/chat](https://badges.gitter.im/unicorn-engine/unicorn.svg)](https://gitter.im/unicorn-engine/chat?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
55
[![Build Status](https://travis-ci.org/unicorn-engine/unicorn.svg?branch=master)](https://travis-ci.org/unicorn-engine/unicorn)
66
[![pypi downloads](https://pepy.tech/badge/unicorn)](https://pepy.tech/project/unicorn)
7+
[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/unicorn.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:unicorn)
78

89
Unicorn is a lightweight, multi-platform, multi-architecture CPU emulator framework
910
based on [QEMU](http://qemu.org).

qemu/target-arm/unicorn_arm.c

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ void arm_release(void* ctx)
3232
g_free(cpu->cpreg_values);
3333
g_free(cpu->cpreg_vmstate_indexes);
3434
g_free(cpu->cpreg_vmstate_values);
35-
cpu_watchpoint_remove_all(CPU(cpu), BP_CPU);
3635

3736
release_common(ctx);
3837
}

qemu/unicorn_common.h

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ static void release_common(void *t)
5151
memory_free(s->uc);
5252
tb_cleanup(s->uc);
5353
free_code_gen_buffer(s->uc);
54+
cpu_watchpoint_remove_all(CPU(s->uc->cpu), BP_CPU);
5455

5556
#if TCG_TARGET_REG_BITS == 32
5657
for(i = 0; i < s->nb_globals; i++) {

0 commit comments

Comments
 (0)