Programming Languages

Report from the virtual ISO C++ meetings in 2020 (core language)

Report from the virtual ISO C++ meetings in 2020 (core language)

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)

Share
Why Windows and Linux line endings don’t line up (and how to fix it)

Why Windows and Linux line endings don’t line up (and how to fix it)

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.

Weird line endings in SQL statement 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)”

Share
Memory error checking in C and C++: Comparing Sanitizers and Valgrind

Memory error checking in C and C++: Comparing Sanitizers and Valgrind

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

Share
Detecting memory management bugs with GCC 11, Part 2: Deallocation functions

Detecting memory management bugs with GCC 11, Part 2: Deallocation functions

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

Share
Red Hat Software Collections 3.7 and Red Hat Developer Toolset 10.1 beta versions now available

Red Hat Software Collections 3.7 and Red Hat Developer Toolset 10.1 beta versions now available

The latest versions of Red Hat Software Collections and Red Hat Developer Toolset are available now in beta. Software Collections 3.7 delivers the latest stable versions of many popular open source runtime languages, web servers, and databases natively to the Red Hat Enterprise Linux platform. These components are supported for up to five years, supporting a more consistent, efficient, and reliable developer experience.

Continue reading Red Hat Software Collections 3.7 and Red Hat Developer Toolset 10.1 beta versions now available

Share
The GDB developer’s GNU Debugger tutorial, Part 1: Getting started with the debugger

The GDB developer’s GNU Debugger tutorial, Part 1: Getting started with the debugger

This article is the first in a series demonstrating how to use the GNU Debugger (GDB) effectively to debug applications in C and C++. If you have limited or no experience using GDB, this series will teach you how to debug your code more efficiently. If you are already a seasoned professional using GDB, perhaps you will discover something you haven’t seen before.

Continue reading The GDB developer’s GNU Debugger tutorial, Part 1: Getting started with the debugger

Share