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>
This commit is contained in:

committed by
Damjan Marion

parent
a402b83643
commit
e82c73a96e
@ -339,9 +339,7 @@ vlib_buffer_validate_alloc_free (vlib_main_t * vm,
|
|||||||
|
|
||||||
if (known != expected_state)
|
if (known != expected_state)
|
||||||
{
|
{
|
||||||
vlib_panic_with_msg
|
clib_panic ("%s %U buffer 0x%x", is_free ? "freeing" : "allocating",
|
||||||
(vm, "%s %U buffer 0x%x",
|
|
||||||
is_free ? "freeing" : "allocating",
|
|
||||||
format_vlib_buffer_known_state, known, bi);
|
format_vlib_buffer_known_state, known, bi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user