-
Notifications
You must be signed in to change notification settings - Fork 14
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
CPP Server segfaults when user sends "/q" (quit) command #8
Comments
This only happens when the server was compiled with a recent g++ compiler (e.g. 8.3.0.) , it seems. |
Interesting. |
I did some debugging using DDD with one version running on a Raspberry Pi with Raspbian Linux (compiled with g++ 6.x) that works fine and compared it with a version compiled with g++ 8.3.0 on a x86_64 Ubuntu PC. The segfault happens in "serverChat.cc" at line 34. With the g++ 6.x build the condition of the "for (auto &p : clients)" loop (line 34) is not matched and the code returns to the while loop. Everything is fine. However, with the g++ 8.x build the code simpy segfaults at the same line (line 34). It happens during the second iteration of the "for ..." loop after handleLostConnection has been called. May be an optimizing problem or a change with g++ handling exceptions or so. I haven't touched C++ code in a while. Maybe that helps, thank you very much for getting back to me. P.S.: great software, quite interesting for retro people like me building a classic console based BBS based on Linux standard tools. |
Hey! I got a chance to try running this with g++ 9.1.0. Couldn't reproduce this bug there unfortunately. |
I just tested your code as I am in search of exactly something like this. But the CPP version crashes with a segfault everytime a user sends "/q" (quit).
The text was updated successfully, but these errors were encountered: