gnrc_sixlowpan_frag_vrb: fix issues with interval marker inherited from base#12848
Conversation
`gnrc_sixlowpan_frag_rb_base_rm()` cleans up the intervals which is part of `gnrc_sixlowpan_frag_rb`, not `gnrc_sixlowpan_frag`, so when the `gnrc_sixlowpan_frag` is not compiled in, but `gnrc_sixlowpan_frag_rb`, the intervals allocated in the reassembly buffer and inherited by the virtual reassembly buffer are never released.
|
From #12648 (comment):
After two days of bug hunting I finally found that leak and provided a fix (a4e41b8) here, as it was an issue within the VRB, as resends are a feature of SFR, I added the test case |
|
I'm getting a segmention fault on this one (or hard fault if none native). |
|
The latest fixup should fix that. It unrolls the definition of |
|
Shouldn;t it be; |
|
I'm getting |
|
Did you patch in the patch above and added the |
My bad I though those where two test cases:
sorry |
There are two test cases, but they are
;-) |
|
EDIT apparently I hadn't cleaned properly. |
|
Sorry for all the noise, I was compiling with
Details
Details |
|
Squashed. |
749f534 to
05d0c48
Compare
|
Travis complained: Please re-schedule build when addressed. |
|
Is |
05d0c48 to
98db58c
Compare
|
I added a suppression comment. I'll have an I on the Travis output in case this wasn't enough. |
I though the same thing hahaha... |
|
That did not seem to be it :-/. |
|
It still points to line 100 though... :-/ |
Otherwise the list in `base->ints` will get lost.
98db58c to
d9ecc0b
Compare
|
I think |
|
It's passing now. |
Errors are unrelatedI rerun without tests. |
|
My ACK stil stand, feel free to merge when it is green. |
| if (tmp == base->ints) { | ||
| tmp = NULL; | ||
| } | ||
| /* cppcheck-suppress nullPointer |
There was a problem hiding this comment.
@miri64 Can you confirm, just for my sake, why this comment is correct?
tmp can't clearly be a NULL pointer here
If that statement is true then the if right above should never be taken.
Or did you perhaps forgot to add a break?
There was a problem hiding this comment.
Mhh... now that you say that, it seems as clear as day ^^". Yes, there is a break missing.
There was a problem hiding this comment.
BTW Thanks to Coverity Scan
There was a problem hiding this comment.
Well, cppcheck also picked it up, I was just stupid ;-P
Contribution description
gnrc_sixlowpan_frag_rb_base_rm()cleans up the intervals which is part ofgnrc_sixlowpan_frag_rb, notgnrc_sixlowpan_frag, so when thegnrc_sixlowpan_fragis not compiled in, butgnrc_sixlowpan_frag_rb, the intervals allocated in the reassembly buffer and inherited by the virtual reassembly buffer are never released.This also adds an error return for the reassembly buffer, when the interval buffer is full.
Testing procedure
Should still pass.
When applying the following patch
(so the interval provided with the base can be changed and reset after each test and the removal (end == 0) is checked in the remove test).
should also succeed.
Issues/PRs references
None