Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault in Socket_getReadySocket for MQTTAsync #9

Closed
jpwsutton opened this issue Feb 4, 2016 · 0 comments
Closed

Segmentation fault in Socket_getReadySocket for MQTTAsync #9

jpwsutton opened this issue Feb 4, 2016 · 0 comments

Comments

@jpwsutton
Copy link
Contributor

migrated from Bugzilla #484363
status RESOLVED severity normal in component MQTT-C for 1.2
Reported in version v0.5 on platform PC
Assigned to: Ian Craggs

On 2015-12-14 18:23:46 -0500, Ian Craggs wrote:

Hello,

please reopen this bug for version 1.3, for plattform Windows, build with Visual Studio 2010.

My application crashes in Socket_getReadySocket() and Socket_close()
because the pointer s.cur_clientsds becomes 0xdddddddd. Which is obviously an
invalid pointer.
It usually happens while some other part (none mqtt part) of my application does
some other socket operation (listen, accept connection, release connection, ...).

I have tried to write some simple test program, which does something similar
to my application. But so far I have not reproduced the crash with the attached
test application. (But maybe you could use it to improve the test collection.)

Greetings
Juergen

copied from bug 447672

On 2015-12-14 18:30:33 -0500, Ian Craggs wrote:

The same fix is needed for MQTTAsync.c as was applied to MQTTClient.c in bug 447672, to stop a socket being closed when its data structure is still being used in getReadySocket.

On 2015-12-15 07:42:00 -0500, Ian Craggs wrote:

Added fix to the develop branch.

@frett27 frett27 mentioned this issue Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant