]>
git.proxmox.com Git - mirror_frr.git/blob - tests/lib/test_segv.c
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * SEGV / backtrace handling test.
5 * copied from test-sig.c
7 * Copyright (C) 2013 by David Lamparter, Open Source Routing.
8 * Copyright (C) 2013 by Internet Systems Consortium, Inc. ("ISC")
10 * This file is part of Quagga
16 #include "lib/memory.h"
18 struct frr_signal_t sigs
[] = {};
20 struct event_loop
*master
;
32 static void func2(size_t depth
, int *arg
)
34 /* variable stack frame size */
36 for (size_t i
= 0; i
< depth
; i
++)
39 func2(depth
- 1, buf
);
42 for (size_t i
= 0; i
< depth
; i
++)
52 static void threadfunc(struct event
*thread
)
59 master
= event_master_create(NULL
);
60 signal_init(master
, array_size(sigs
), sigs
);
62 zlog_aux_init("NONE: ", LOG_DEBUG
);
64 event_execute(master
, threadfunc
, 0, 0);