diff options
author | Klement Sekera <ksekera@cisco.com> | 2019-01-30 18:29:28 +0100 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-01-31 16:27:37 +0000 |
commit | e82c73a96ea68268804b3f8b3db8cca738cbfe64 (patch) | |
tree | 7f59c736f906956eea0f7c2109e65a072b0ea7e7 /src/vlib | |
parent | a402b8364306b5a01c75ea4223d7d75afdea0a98 (diff) |
assert on double-free in debug build
The assert allows easier debugging in gdb by aborting instead of exiting
cleanly. Also a core is generated so a stack trace can be obtained.
Change-Id: I2d05488c4522f4d4570fdfe0283130eb4c853d2a
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'src/vlib')
-rw-r--r-- | src/vlib/buffer.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/vlib/buffer.c b/src/vlib/buffer.c index 701ddde2227..77602a61ac1 100644 --- a/src/vlib/buffer.c +++ b/src/vlib/buffer.c @@ -339,10 +339,8 @@ vlib_buffer_validate_alloc_free (vlib_main_t * vm, if (known != expected_state) { - vlib_panic_with_msg - (vm, "%s %U buffer 0x%x", - is_free ? "freeing" : "allocating", - format_vlib_buffer_known_state, known, bi); + clib_panic ("%s %U buffer 0x%x", is_free ? "freeing" : "allocating", + format_vlib_buffer_known_state, known, bi); } clib_spinlock_lock (&bm->buffer_known_hash_lockp); |