1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

10 Commits

Author SHA1 Message Date
Sören Tempel
178c9eb745 gnrc_pktbuf: use _free function with gnrc_pktbuf_malloc
Otherwise the local mallocs variable is not decremented correctly (if
TEST_SUITES is defined) and the fuzzing setup (i.e. when MODULE_FUZZING
is defined) does not terminate. This regression was introduced in
3970b667aa.
2021-02-12 18:15:40 +01:00
Marian Buschsieweke
3970b667aa
sys/net/gnrc_pktbuf: deduplicate code
Implement gnrc_pktbuf_release_error() in gnrc_pktbuf once, rather than providing
two implementations in gnrc_pktbuf_static and gnrc_pktbuf_malloc
2021-01-26 10:50:19 +01:00
Bas Stottelaar
1b35d06a51 sys/*: realign ENABLE_DEBUG 2020-10-23 11:27:48 +02:00
Akshai M
5523d119b6 gnrc/pktbuf : Move 'GNRC_PKTBUF_SIZE' to 'CONFIG_' 2020-06-11 14:46:36 +05:30
Sören Tempel
a8b0491751 gnrc_pktbuf_malloc: add comment to fuzzing termination condition 2020-05-26 17:24:44 +02:00
Sören Tempel
e0570181e4 gnrc_pktbuf_malloc: Terminate when fuzzing packet is freed
Since RIOT is an operating system the native binary will never terminate
[0]. The termination condition for fuzzing GNRC is that the packet was
handled by the network stack and therefore freed. If it is never freed
we will deadlock meaning a memory leak was found, afl should be able to
detect this through timeouts.

This is currently only supported for gnrc_pktbuf_malloc since this is
the pktbuf implementation I used for fuzzing. Implementing this in
pktbuf.h is not possible.

[0]: Except NATIVE_AUTO_EXIT is defined, however, even with that define
set RIOT will only terminate when all threads terminated. Unfortunately,
gnrc_udp and other network threads will never terminate.
2020-04-07 17:48:39 +02:00
Martine S. Lenders
b83430aa62 gnrc_pktbuf: remove gnrc_pktbuf_duplicate_upto
The removal of this function was already announced for the 2019.04
release. So it is safe to remove it.
2019-07-03 15:09:18 +02:00
Martine Lenders
4f733840c6 gnrc_pktbuf_malloc: allow write-protect of size 0 snips
Size 0 snips are legal packet snips (empty payload e.g.) so it doesn't
make sense to issue an error in the write-protection in that case.

API documentation doesn't mention it either and the tests still pass
with the check removed.
2019-03-12 14:35:58 +01:00
Joakim Nohlgård
8514ff5f15 gnrc/pktbuf: Const correctness on gnrc_pktbuf_add 2018-06-15 00:44:23 +02:00
Martine Lenders
475e2bdc82 gnrc_pktbuf_malloc: initial import of a malloc()-based pktbuf
The main motivation for this is to valgrind the network stack.
2017-07-15 17:54:47 +02:00