|
From: | David Bourgeois |
Subject: | Re: [lwip-devel] [bug #57734] MQTT broken with muti-segments data |
Date: | Thu, 6 Feb 2020 18:46:10 +0100 |
Running suite(s): IPv4
< Receive publish
< Topic: "topic" (message len: 62)
< Data: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" (len: 62, rem: 0)
> Receive segmented topic
< Topic: "topic" (message len: 62)
< Data: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" (len: 62, rem: 0)
> Receive segmented message
< Topic: "topic" (message len: 62)
< Data: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" (len: 62, rem: 0)
SOCKETS
100%: Checks: 112, Failures: 0, Errors: 0
Forgot to mention a couple of things:
< Receive publish
< Topic: "topic" (message len: 62)
< Data: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" (len: 62, rem: 0)
> Receive segmented topic
SOCKETS
99%: Checks: 112, Failures: 0, Errors: 1
../../../../src/../test/unit/mqtt/test_mqtt.c:317:E:MQTT:segmented_sub_pub:0: (after this point) Received signal 11 (Segmentation fault)
OK, I managed to create this patch that I preferred to send you first here before adding it to the ticket as that's the first time I'm doing this. But if it's fine I'll fill-up the bug report for tracking.I could reproduce the problem, it comes when the topic ends-up being spread over 2 TCP segments. So I added 3 unit tests, a standard single segment incoming publish, and 2 segmented either in the topic or message.Let me know what you think and I'll add it once it's OK.On Wed, Feb 5, 2020 at 8:09 PM Simon Goldschmidt <address@hidden> wrote:Follow-up Comment #3, bug #57734 (project lwip):
> What could I use as an example to reproduce this use case?
The best way is to provide a unit test that shows the bug. That way, we can
ensure it won't happen again.
See test/unit/mqtt/test_mqtt.c
_______________________________________________________
Reply to this item at:
<https://savannah.nongnu.org/bugs/?57734>
_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |