Bejegyzések

Finalizing the GSoC project for KStars

I worked on the KStars during this summer to improve the codebase with C++11 features with Google Summer of Code. I spent the last month to write the first GUI tests for KStars and KStars Lite. KStars Lite can be built and run also on Linux host now although it was developed for Android by a previous GSoC student in 2016. Additional contributions include fixing some bugs found by Clang Sanitizers, usability improvements and templeted FITS decoding. The GSoC period was successful, the goals were reached, but if I would have still more time...

The achievements during the second GSoC period in KStars

In this month, I have been working on fixing bugs found by static code analyzers in KStars. All of the tools are open-source or they can be used for free by open-source projects:

- cppcheck: C++ source code analyzer.
- Clazy: Qt-oriented static code analyzer by KDE for C++ based on Clang.
Clang Static Analyzer: Clang Static Analyzer is a Clang-based static code analyzer for C++.
- Krazy: Code analyzer by KDE.
- Coverity: Coverity is a commercial C++ static code analyzer from Synopsys, but it is free for open-source projects.

If you want to give these analyzers a try, you can pick the build scripts from the tools directory of KStars Git repository and try in your project following our wiki page on the bottom.

Meanwhile I keep fixing memory handling bugs what I find when I test KStars built with runtime sanitizers and adding C++ smart pointers to certain places to make pointer-handling more safe. I also try to minimize the unnecessary includes over the codebase to cut the build time alth…

The achievements during the first GSoC period in KStars

I was able to do major improvements to the build system of KStars. I think more and more open-source projects should pick up these low-hanging fruits with CMake and Clang:

- CCache: Speed-up the development time and working with git branches by caching the compiled object files.
- Unity Build: This simple "hack" can reduce the build time dramatically by compiling temporary C++ meta files in which the normal C++ files are included. The build time can be speeded up to 2x-3x for bigger projects.
- Clang Sanitizers: Use undefined behavior and address sanitizers to hunt down memory handling errors. Although the executable must be recompiled with Clang and special compiler flags, the resulted binary will run with minimal slowdown. It is not a complete replacement, but these sanitizers can catch most of the problems found by Valgrind during normal runtime.
- Clang Format: Format the source code with a real compiler engine.

More details are on our wiki page:
https://techbase.kde.org…

Modernizing KStars codebase during GSOC

KStars has a long history and many developers touched the >136000 lines of C++ codes. The goal of my GSOC project to do a major overall improvement and bring the modern C++ features to improve the stability as well as fix the memory handling errors. I have the following goals in June to make KStars better:

May 30th to June 26th:

 ● Add ccache support
 ● Add hardening support to the CMake build system (improve security)
 ● Add Clang specific improvements to the CMake build system
 ● Add Clang sanitizers to the CMake build system
 ● Run the KStars application with the sanitizers enabled and fix all memory error found by these tools
 ● Add Unity build to the CMake build system to cut the build time
 ● Refactor codes to modern C++11/C++14 what I get in touch while fixing bugs.
 ● Add documentation about the improvements and the sanitizers to the wiki pages.

My mentor: Jasem Mutlaq