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
[no sq] Server code cleanups / refactors #14438
Conversation
Commits squashed and no longer WIP. |
d5cc2f8
to
99f4a1a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compiles.
Singleplayer game showed no issues while testing for a while.
Unittests pass.
Code looks OK.
Found the following with valgrind upon shutdown (closing the window):
==15129== Thread 16 ConnectionSend:
==15129== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==15129== at 0x5471A66: sendto (sendto.c:27)
==15129== by 0x54EC38: UDPSocket::Send(Address const&, void const*, int) (in ./minetest)
==15129== by 0x52C462: con::ConnectionSendThread::rawSend(con::BufferedPacket const*) (in ./minetest)
==15129== by 0x531AF5: con::ConnectionSendThread::sendPackets(float, unsigned int) (in ./minetest)
==15129== by 0x536BA7: con::ConnectionSendThread::run() (in ./minetest)
==15129== by 0x6426D7: Thread::threadProc(Thread*) (in ./minetest)
==15129== by 0x50F3252: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30)
==15129== by 0x53DEAC2: start_thread (pthread_create.c:442)
==15129== by 0x546FA03: clone (clone.S:100)
==15129== Address 0x3d06746e is 318 bytes inside a block of size 512 alloc'd
==15129== at 0x4849013: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==15129== by 0x522328: std::vector<unsigned char, std::allocator<unsigned char> >::_M_default_append(unsigned long) (in ./minetest)
==15129== by 0x5180D4: con::makePacket(Address const&, SharedBuffer<unsigned char> const&, unsigned int, unsigned short, unsigned char) (in ./minetest)
==15129== by 0x51DFA7: con::UDPPeer::processReliableSendCommand(std::shared_ptr<con::ConnectionCommand>&, unsigned int) (in ./minetest)
==15129== by 0x51EACC: con::UDPPeer::PutReliableSendCommand(std::shared_ptr<con::ConnectionCommand>&, unsigned int) (in ./minetest)
==15129== by 0x530294: con::ConnectionSendThread::processReliableCommand(std::shared_ptr<con::ConnectionCommand>&) (in ./minetest)
==15129== by 0x536C92: con::ConnectionSendThread::run() (in ./minetest)
==15129== by 0x6426D7: Thread::threadProc(Thread*) (in ./minetest)
==15129== by 0x50F3252: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30)
==15129== by 0x53DEAC2: start_thread (pthread_create.c:442)
==15129== by 0x546FA03: clone (clone.S:100)
==15129==
but it doesn't appear that you changed this part. It might be an unrelated issue.
depends on
#14436, #14423fixes #14005
To do
This PR is a
Work in Progress/ Ready for Review.