data_structures

data structures in C
Log | Files | Refs | Feed

commit adfbbda42700db88028faf9f010732f8767b68c1
parent 94b5cb5b11c6f64fdf3aa30619d2ea7ef746f2ab
Author: Jenny Doe <tng@soykaf.me>
Date:   Fri, 22 Mar 2019 00:52:03 +0100

added: list of known segfaults

Diffstat:
Asegfaults | 37+++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+), 0 deletions(-)

diff --git a/segfaults b/segfaults @@ -0,0 +1,37 @@ +/* not taking dangling pointers issue into account */ + + +/* LIST.H */ + +list_init(NULL, _); +list_destroy(NULL); /* list_rem_next() can't fail here, but + * list->destroy() might still segfault */ +list_ins_next(NULL, _, _); +list_rem_next(NULL, _, _); +list_rem_next(_, _, NULL); + + +/* DLIST.H */ + +dlist_init(NULL, _); +dlist_destroy(NULL); /* same as per list_destroy() */ +dlist_ins_next(NULL, _, _); +dlist_ins_next(_, NULL, _); /* and list's size != 0 */ +dlist_ins_prev(NULL, _, _); +dlist_ins_prev(_, NULL, _); /* and list's size != 0 */ +dlist_remove(NULL, _, _); +dlist_remove(_, NULL, _); /* and list's size > 1 */ +dlist_remove(_, _, NULL); + + +/* CLIST.H */ + +clist_init(NULL, _); +clist_destroy(NULL); /* same as per list_destroy() */ +clist_ins_next(NULL, _, _); +clist_ins_next(_, NULL, _); /* and list's size != 0 */ +clist_ins_prev(NULL, _, _); +clist_ins_prev(_, NULL, _); /* and list's size != 0 */ +clist_rem_next(NULL, _, _); +clist_rem_next(_, NULL, _); /* and list's size > 1 */ +clist_rem_next(_, _, NULL);