History

Fix when bound checking and test coverage is used at the same time

herman ten brugge committed 4 years ago

Commit 4efcada1 parent 184d8451 file · +3 −3Browse files

Unified · Split

lib/bcheck.c+3−3
@@ -237,7 +237,7 @@ typedef struct alloca_list_struct { · 236 unmodified lines
237#define BOUND_GET_TID(id) id = syscall (SYS_gettid)237#define BOUND_GET_TID(id) id = syscall (SYS_gettid)
238#else238#else
239#define BOUND_TID_TYPE int239#define BOUND_TID_TYPE int
240#define BOUND_GET_TID(id) 0240#define BOUND_GET_TID(id) id = 0
241#endif241#endif
242 242
243typedef struct jmp_list_struct {243typedef struct jmp_list_struct {
@@ -1451,7 +1451,7 @@ void *__bound_malloc(size_t size, const void *caller) · 1207 unmodified lines
1451 dprintf(stderr, "%s, %s(): %p, 0x%lx\n",1451 dprintf(stderr, "%s, %s(): %p, 0x%lx\n",
1452 __FILE__, __FUNCTION__, ptr, (unsigned long)size);1452 __FILE__, __FUNCTION__, ptr, (unsigned long)size);
1453 1453
1454 if (NO_CHECKING_GET() == 0) {1454 if (inited && NO_CHECKING_GET() == 0) {
1455 WAIT_SEM ();1455 WAIT_SEM ();
1456 INCR_COUNT(bound_malloc_count);1456 INCR_COUNT(bound_malloc_count);
1457 1457
@@ -1523,7 +1523,7 @@ void __bound_free(void *ptr, const void *caller) · 65 unmodified lines
1523 1523
1524 dprintf(stderr, "%s, %s(): %p\n", __FILE__, __FUNCTION__, ptr);1524 dprintf(stderr, "%s, %s(): %p\n", __FILE__, __FUNCTION__, ptr);
1525 1525
1526 if (NO_CHECKING_GET() == 0) {1526 if (inited && NO_CHECKING_GET() == 0) {
1527 WAIT_SEM ();1527 WAIT_SEM ();
1528 INCR_COUNT(bound_free_count);1528 INCR_COUNT(bound_free_count);
1529 tree = splay (addr, tree);1529 tree = splay (addr, tree);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t