| @@ -559,7 +559,9 @@ void * __bound_ptr_add(void *p, size_t offset) · 558 unmodified lines |
| 559 | 559 | if (tree->is_invalid || addr + offset > tree->size) { |
| 560 | 560 | POST_SEM (); |
| 561 | 561 | if (print_warn_ptr_add) |
| 562 | | − bound_warning("%p is outside of the region", p + offset); |
| 562 | + bound_warning("%p is outside of the region (0x%lx..0x%lx)", |
| 563 | + p + offset, (long)tree->start, |
| 564 | + (long)(tree->start + tree->size - 1)); |
| 563 | 565 | if (never_fatal <= 0) |
| 564 | 566 | return INVALID_POINTER; /* return an invalid pointer */ |
| 565 | 567 | return p + offset; |
| @@ -605,7 +607,9 @@ void * __bound_ptr_indir ## dsize (void *p, size_t offset) \ · 39 unmodified lines |
| 605 | 607 | if (addr <= tree->size) { \ |
| 606 | 608 | if (tree->is_invalid || addr + offset + dsize > tree->size) { \ |
| 607 | 609 | POST_SEM (); \ |
| 608 | | − bound_warning("%p is outside of the region", p + offset); \ |
| 610 | + bound_warning("%p is outside of the region (0x%lx..0x%lx)", \ |
| 611 | + p + offset, (long)tree->start, \ |
| 612 | + (long)(tree->start + tree->size - 1)); \ |
| 609 | 613 | if (never_fatal <= 0) \ |
| 610 | 614 | return INVALID_POINTER; /* return an invalid pointer */ \ |
| 611 | 615 | return p + offset; \ |
| @@ -1105,11 +1109,9 @@ add_bounds: · 493 unmodified lines |
| 1105 | 1109 | while (p[0] != 0) { |
| 1106 | 1110 | tree = splay_insert(p[0], p[1], tree); |
| 1107 | 1111 | #if BOUND_DEBUG |
| 1108 | | − if (print_calls) { |
| 1109 | | − dprintf(stderr, "%s, %s(): static var %p 0x%lx\n", |
| 1110 | | − __FILE__, __FUNCTION__, |
| 1111 | | − (void *) p[0], (unsigned long) p[1]); |
| 1112 | | − } |
| 1112 | + dprintf(stderr, "%s, %s(): static var %p 0x%lx\n", |
| 1113 | + __FILE__, __FUNCTION__, |
| 1114 | + (void *) p[0], (unsigned long) p[1]); |
| 1113 | 1115 | #endif |
| 1114 | 1116 | p += 2; |
| 1115 | 1117 | } |