Floating point arithmetic is a popularly esoteric subject in computer science. It is safe to say that every software engineer has heard of floating point numbers. Many have even used them at some point. Few would claim to actually understand them to a reasonable extent and significantly fewer would claim to know all of the corner cases. That last category of engineer is probably mythical or, at best, optimistic. I have dealt with floating-point related issues in the GNU C Library in the past, but I won’t claim to be an expert at it. I definitely did not expect to learn about the existence of a new kind of number, as I did a couple of months ago.
Continue reading Mostly harmless: An account of pseudo-normal floating point numbers
Red Hat’s single sign-on (SSO) technology, based on the Keycloak open source project, is Red Hat’s solution for securing web applications and RESTful web services. The goal of Red Hat’s single sign-on technology is to make security simple, so that it is easy for application developers to secure the apps and services they have deployed in their organization.
Continue reading Using Red Hat’s single sign-on technology with external databases, Part 1: Install and configure SSO with MariaDB
This is the second article of a two-part series in which I describe the automated testing infrastructure that I am developing for the SystemTap project. The first article, “Automating the testing process for SystemTap, Part 1: Test automation with libvirt and Buildbot,” described my solution for managing test machines and for producing SystemTap test results. This follow-up article continues by describing Bunsen, the toolkit I developed for storing and analyzing test results.
Continue reading Automating the testing process for SystemTap, Part 2: Test result analysis with Bunsen
C++ standardization was dramatically different in 2020 from earlier years. The business of the International Organization for Standardization (ISO) committee all took place virtually, much like everything else during this pandemic. This article summarizes the C++ standardization proposals before the Core and Evolution Working Groups last year.
Continue reading Report from the virtual ISO C++ meetings in 2020 (core language)
For a multitude of reasons, developers usually compile the project they are working on with only one compiler. On Red Hat Enterprise Linux 8, the system compiler for C and C++ is GNU Compiler Collection (GCC) 8, and newer versions are available through the GCC toolset.
Continue reading Use multiple compilers to build better projects
I recently wrote a few automated database-populating scripts. Specifically, I am running Microsoft SQL Server in a container in a Kubernetes cluster—okay, it’s Red Hat OpenShift, but it’s still Kubernetes. It was all fun and games until I started mixing Windows and Linux; I was developing on my Windows machine, but obviously the container is running Linux. That’s when I got the gem of an error shown in Figure 1. Well, not so much an error as errant output.
Figure 1: Errant output from an SQL statement.
Continue reading “Why Windows and Linux line endings don’t line up (and how to fix it)”
Over the past year, I have been implementing an automated infrastructure to test the SystemTap project and to collect and analyze the test results. SystemTap is a scripting language for creating instrumentation to observe a live running Linux kernel and user-space applications. The SystemTap language translator produces Linux kernel modules. These modules depend on internal details of the Linux kernel that vary significantly between different versions of Linux.
Continue reading Automating the testing process for SystemTap, Part 1: Test automation with libvirt and Buildbot
This article compares two tools, Sanitizers and Valgrind, that find memory bugs in programs written in memory-unsafe languages. These two tools work in very different ways. Therefore, while Sanitizers (developed by Google engineers) presents several advantages over Valgrind, each has strengths and weaknesses. Note that the Sanitizers project has a plural name because the suite consists of several tools, which we will explore in this article.
Continue reading Memory error checking in C and C++: Comparing Sanitizers and Valgrind
The first half of this article described dynamic memory allocation in C and C++, along with some of the new GNU Compiler Collection (GCC) 11 features that help you detect errors in dynamic allocation. This second half completes the tour of GCC 11 features in this area and explains where the detection mechanism might report false positives or false negatives.
Continue reading Detecting memory management bugs with GCC 11, Part 2: Deallocation functions
Recently, I’ve been trying to improve the speed of the Clang compiler for C and C++. When I profile the Clang pre-processing step on a large file, one function quickly stands out:
Continue reading Optimizing the Clang compiler’s line-to-offset mapping