I’ve been trying various static analysis tools on the C++ code of The Server Framework. I’ve now been using Resharper C++ quite regularly for over a year and I still use the Gimpel PC-Lint Plus Beta on a regular basis. I haven’t used CppDepend as much, mainly because once I’d fixed the issues that it raised, and that I decided I needed to fix, I pretty much left it alone. This is possibly because I run it as an external tool and I run both Resharper and PC-Lint as fully integrated Visual Studio extensions.
Version 6.9 of The Server Framework was released today.
This release includes lots of code change due to: the removal of support for Visual Studio 2012 and the results of lots of static analysis.
As always, see the release notes here, for full details of all changes.
Bug fixes:
Bug fix to JetByteTools::Win32::TAddressOrderedMultiLock::Unlock() which was not setting the ’locked’ flag correctly and so could lead to locks being unlocked multiple times.
This is one of those ’note to self’ postings…
I have a VMWare box that uses bridged networking and has a static DHCP address that I use for a specific client’s testing as a db server. Every so often the virtual machine fails to connect to the network properly and ends up with a bogus ip address. I then spend ages trying to work out what’s going wrong…
This link, may help.
This year is proving to be yet another busy one for us. We’ve continued to work with Eonic Gaming on their servers for the Turf Battles Triumphus 3D MMORPG and we have done quite a bit of work with various clients regarding hardening their TLS servers. The main focus though has been digging into WebRTC data channels.
The WebRTC work is nice, though fairly complex. It’s based on lots of RFCs and the initial learning curve was pretty steep.
Enabling FILE_SKIP_COMPLETION_PORT_ON_SUCCESS on a handle associated with an I/O completion port can improve performance and reduce context switching by allowing the thread that calls the API that can complete asynchronously to handle the completion “inline” if the call can complete synchronously. This is especially useful for TCP reads when there’s already data in the network stack’s buffers, or writes when there is space in the buffers. Whilst there are design issues that must be taken into consideration before simply enabling this flag (beware recursion!
Version 6.8 of The Server Framework was released today.
This release includes important bug fixes. It also includes lots of code change due to: the removal of support for Visual Studio 2010, adding support for Visual Studio 2017 and the results of lots of static analysis.
This release is essential for users of Release 6.7.
As always, see the release notes here, for full details of all changes.
Bug fixes:
A bug has been discovered in Release 6.7 in the code that deals with TCP socket writes that involve more than a single buffer. These ‘multi-buffer writes’ are writes that involves either a buffer chain or a block of data passed as a pointer and a length where the length exceeds the size of the buffer allocator that the connection is using.
The bug prevents the ‘multi-buffer write’ from being executed as a single atomic write at the network layer and so can cause corruption of a TCP data stream if multiple sockets are writing to the same connection concurrently.
I’ve been looking at Resharper C++ by JetBrains for a while now and the trial period has finally run out. I immediately bought a license which shows how my feelings have changed about the product during the trial.
Initially I found that the tool got in my way too much, I still find it a little sluggish at times but I think that my initial tests were hurt by the fact that I was running multiple copies of Visual Studio (as is my way) with multiple large projects and generating code inspection reports in all of them at the same time… Well, that’s how I’d want to use it… Anyway, when limiting myself to one or two concurrent instances things were better.
I’ve been trying various static analysis tools on the C++ code of The Server Framework. So far I’m using Resharper C++ and the Gimpel PC-Lint Plus Beta on a regular basis and I’ve now added CppDepend into the loop.
Full disclosure. I have been given a CppDepend license.
As I’ve said before, whilst CppDepend is easy to get hold of, easy to install and “just works” I don’t find it that useful.
Previously on “Practical Testing”… Having just resurrected this series of blog posts about testing a non-trivial piece of real-world C++ code I’ve fixed a few bugs and done a bit of refactoring. There’s one more step required to bring the code in this article right up to date.
The timer queue that is the focus of these blog posts is part of The Server Framework. This body of code has been around since 2001 and has evolved to support new platforms and compilers.