Attention is currently required from: laforge, pespin.
jolly has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/libosmocore/+/40584?usp=email )
Change subject: Avoid reusing pending buffer; append incoming data instead ......................................................................
Patch Set 6:
(2 comments)
File src/core/osmo_io.c:
https://gerrit.osmocom.org/c/libosmocore/+/40584/comment/ae43fbd2_c3c7a258?u... : PS5, Line 338: pending = iofd_msgb_alloc2(iofd, msgb_length(iofd->pending) + msgb_length(msg));
AFAICT this is not fullfilling the requirement that: […]
The code path of iofd_msgb_alloc2 is called, if the msg would not fit into the tailroom of iofd->pending. This implies that the length of data in iofd->pending plus the lengh of data in msg exceed the iofd->msgb_alloc.size. The allocated message will have a size that is greater.
File src/core/osmo_io_internal.h:
https://gerrit.osmocom.org/c/libosmocore/+/40584/comment/d8152eb8_c3078e67?u... : PS5, Line 156: struct msgb *iofd_msgb_alloc2(struct osmo_io_fd *iofd, size_t extra);
this pnew param is named "size" now in the .c file.
Done