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

Yet another "double free or corruption (out)" #8

Open
mmueller-kaffeeschluerfercom opened this issue Oct 4, 2017 · 4 comments
Open

Comments

@mmueller-kaffeeschluerfercom
Copy link

mmueller-kaffeeschluerfercom commented Oct 4, 2017

Steps to reproduce:

  1. compile and install libwebsockets-2.3
  2. compile example echoserver from cppWebSockets
  3. run echoserver
  4. open index.html (from echoserver directory) in a browser (here: firefox 55.0.2)
  5. enter a long string in the textbox and click send

On one system (ubuntu 16.04), it crashes with strings of length 16, like "1234567890123456", on another (yocto on intel edison) after 128 characters.

This does not happen with the libwebsockets-test-echo, so I assume it is something with cppWebSockets. Any idea?

@mmueller-kaffeeschluerfercom
Copy link
Author

mmueller-kaffeeschluerfercom commented Oct 9, 2017

I tried to use it with libwebsockets-2.0. The problem does not occur anymore. Can you please precise on which version of libwebsockets you worked while developing cppWebSockets? It seems to have compatibility issues with newer versions. I still have some segmentation faults in callback_main now and then...

@HDBaggy
Copy link
Contributor

HDBaggy commented Jan 27, 2018

Yes I am also facing the same issue.

@billpriest
Copy link

So, I tracked this down and fixed it. While I was at it I modernized the code and fixed complaints from clang-tidy/lazy and cppcheck. Now the echoserver & chatserver apps run w/o crashing and are clean under valgrind.
I'll try a pull request.

@billpriest
Copy link

0001-Changes-to-modernize-and-fix-memory-corruption.patch.gz

I tried to attach this yesterday; I guess it didn't work.

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

3 participants