C++

RedHat
Article

Red Hat at the ISO C++ Standards Meeting (July 2017): Parallelism and Concurrency

Torvald Riegel

Several Red Hat engineers attended the JTC1/SC22/WG21 C++ Standards Committee meetings in July 2017. This post focuses on the sessions of SG1, the study group on parallelism and concurrency. We discussed several synchronization-related proposals, improvements for futures, and, of course, executors. Also, I proposed a few steps that the SG1 community could take to get more efficient in how it conducts its work, which are all inspired by how successful open source projects work. Most of the proposals we discussed...

GNU C library
Article

Statement Frontier Notes and Location Views

Alexandre Oliva

Surely, you too have been frustrated, while single-stepping optimized programs in symbolic debuggers, by the Brownian motion in the source code, and by never being sure, when you reach a certain source line (if you can reach it at all), whether or not earlier lines have taken effect. Our frustration is about to be significantly alleviated, thanks to two new pieces of technology about to be contributed to the GNU toolchain. Statement Frontier Notes are stable markers of source locations...

Featured image for: Report from the virtual ISO C++ meetings in 2020 (core language).
Article

Red Hat at the ISO C++ Standards Meetings (November 2016, Issaquah, and February 2017, Kona): Library

Jonathan Wakely

I attended the recent Issaquah and Kona ISO C++ standards meetings, representing Red Hat and the GCC project, and helping to complete the C++17 standard. As usual, I spent the majority of my time in the Library Working Group (LWG) sessions, but also took part in a subgroup focusing on the Filesystem library, more on that below. Following the National Body (NB) ballot on the C++17 draft, the LWG had a huge number of comments to process. Some issues were...

Red Hat ISO Image
Article

Red Hat at the ISO C++ Standards Meeting (April 2017, Kona): Core Language

Jason Merrill

The March/April C++ meeting was back in Kona, Hawaii again, only a year and a half after the last Kona meeting. As usual, Red Hat sent three of us to the meeting: Jonathan Wakely, Torvald Riegel, and me. The headline from the meeting was voting to submit C++17 for approval by the national bodies. There wasn't really any significant resistance. There was one new feature added in the final draft, namely std::byte , which was expected to go in at...

Featured image for: Report from the virtual ISO C++ meetings in 2020 (core language).
Article

Red Hat at the ISO C++ Standards Meeting (March 2017): Parallelism and Concurrency

Torvald Riegel

Several Red Hat engineers attended the JTC1/SC22/WG21 C++ Standards Committee meetings in March 2017. This post focuses on the sessions of SG1, the study group on parallelism and concurrency. The major topics of work of the week were (1) further polishing of the parallel algorithms in the C++17 draft, (2) making progress on the executors proposal (which provides mechanisms to control how parallel work is executed, for example on which resources), and (3) continuing work on proposals targeting the Concurrency...

Red Hat Enterprise Linux
Article

Running HPC workloads across multiple architectures with Red Hat Enterprise Linux

Adrian Reber

In this article, I want to provide some background details about our recently developed demonstration video - “ Running Game of Life across multiple architectures with Red Hat Enterprise Linux “. This video shows the Game of Life running in a heterogeneous environment using three 64-bit hardware architectures: aarch64 (ARM v8-A), ppc64le (IBM Power little endian) and x86_64 (Intel Xeon). If you are not familiar with the rules of this cellular automaton, they are worth checking out via the reference...

Containers Image
Article

Why I started using containers

Konrad Kleine

A few years back (2013-2016) I was working as a C++ Software Development Engineer at Intel on a monolithic product with a backend written in C++ and a web frontend written in Java. The product was shipped complete with hardware and as a VMware image. Internally we kept ISO CD images on a shared server for every released or QA approved version of the product. Built into the product was a very clever issue reporting mechanism that allowed us, developers...

Configuring mKahaDB persistence storage for ActiveMQ
Article

Now available - Red Hat Software Collections 2.4 and Red Hat Developer Toolset 6.1

Mike Guerette

Today, we are announcing the general availability of Red Hat Software Collections 2.4, Red Hat’s latest set of open source web development tools, dynamic languages, and databases. We are also announcing Red Hat Developer Toolset 6.1, which helps to streamline application development on Red Hat Enterprise Linux by giving developers access to some of the latest, stable open source C and C++ compilers and complementary development tools. New language additions to Red Hat Software Collections 2.4 include: Nginx 1.10 Node.js...

Red Hat Logo
Article

C/C++ library upgrades and opaque data types in process shared memory

Carlos O'Donell

The problem C/C++ libraries expect to be able to change the internal implementation details of opaque data types from release to release since such a change has no external ABI consequences. If an opaque data type is placed in process-shared memory (when allowed by the standard) and shared with multiple processes, each process must ensure they are using exactly the same version of the library or they could fail in unexpected ways during library upgrades. The placement of opaque data...

Red Hat Wimplicit
Article

-Wimplicit-fallthrough in GCC 7

Marek Polacek

(See this article to install GCC 7 on Red Hat Enterprise Linux.) In C and C++, the cases of a switch statement are in fact labels, and the switch is essentially a go to that jumps to the desired label. Since labels do not change the flow of control, one case block falls through to the following case block, unless terminated by a return , a break , a no return call or similar. In the example below, " case...

Fedora logo
Article

ABI change analysis of Fedora packages

Dodji Seketeli

In 2016, many improvements happened in the ABI static analysis framework that is Libabigail . In this article we'll present how fedabipkgdiff , a new Libabigail tool can help Fedora users, developers and others to analyze ABI changes of libraries carried by packages of the distribution. Introduction As many of you already know, the engine used to build RPM packages in the Fedora build system is named Koji . Thus, one can get Fedora RPMs from Koji using a web...

GNU C library
Article

Memory Error Detection Using GCC

Martin Sebor

Introduction GCC has a rich set of features designed to help detect many kinds of programming errors. Of particular interest are those that corrupt the memory of a running program and, in some cases, makes it vulnerable to security threats. Since 2006, GCC has provided a solution to detect and prevent a subset of buffer overflows in C and C++ programs. Although it is based on compiler technology, it's best known under the name Fortify Source derived from the synonymous...

GNU C library
Article

Testing... Testing... GCC

David Malcolm

The next release of the GNU Compiler Collection , GCC 7 , is fast approaching, so in this post, I'm going to talk about work I've done to make GCC more reliable GCC has a large test suite: when I test a patch, roughly 330,000 tests are run, covering various aspects of the compiler, such as: handling valid and invalid syntax in the front-ends verifying that optimizations passes are run verifying that the resulting code runs correctly verifying that the...

GNU C library
Article

Adding buffer overflow detection to string functions

Florian Weimer

This article describes the steps required to add buffer overflow protection to string functions. As a real-world example, we use the strlcpy function, which is implemented in the libbsd library on some GNU/Linux systems. This kind of buffer overflow protection uses a GNU Compiler Collection (GCC) feature for array size tracking (“source fortification”), accessed through the __builtin_object_size GCC built-in function. In general, these checks are added in a size-checking wrapper function around the original (wrapped) function, which is strlcpy in...

Article Thumbnail
Article

November 2016 GNU Toolchain Update Part 2

Nick Clifton

(Part 2)The GNU Toolchain is a collection of  programming tools produced by the GNU Project. The tools are often packaged together due to their common use for developing software applications, operating systems, and low level software for embedded systems.

Article Thumbnail
Article

Eclipse for JNI development and debugging on Linux (Java and C)

Leo Ufimtsev

Cross language development in one project In this tutorial style article I'll discuss how to configure Eclipse for Java Native Interface (JNI) development based on a sample project that you can copy and modify. I.e, you can have a single project that can be both Java and C at the same time, and support a full code navigation and debugging of both languages. This article is focused on the configuration of Eclipse rather than explaining JNI itself, however there are...

Article Thumbnail
Article

C++ support in libcc1: A comprehensive update

Alexandre Oliva

GDB relies on libcc1 's GCC and GDB plugins to implement the " compile code " feature, now extended to support the C++ language. The Compile and Execute machinery enables GDB users to compile and execute code snippets within the context of an existing process. This allows users to perform inspection and modification of the program state using the target language well beyond the feature set historically exposed by symbolic debuggers. Almost anything that can be expressed in C, and...

Article Thumbnail
Article

August 2016 GNU Toolchain Update Part 1

Nick Clifton

The GNU Toolchain is a collection of  programming tools produced by the GNU Project. The tools are often packaged together due to their common use for developing software applications, operating systems, and low level software for embedded systems.

Article Thumbnail
Article

Red Hat at the ISO C++ Standards Meeting (June 2016, Oulu): Library

Jonathan Wakely

The recent WG21 meeting in Oulu, Finland, was an especially busy one for the Library Working Group. Every day was spent working through the list of proposals intended for inclusion in C++17, and we also had three "evening" sessions that ran well past the evening (until nearly midnight, although the sun was still up to trick us into working late). This post describes what I think are the most important library features that were reviewed and approved for inclusion in...

Article Thumbnail
Article

Red Hat at the ISO C++ Standards Meeting (June 2016, Oulu): Parallelism and Concurrency

Torvald Riegel

Several Red Hat engineers recently attended the JTC1/SC22/WG21 C++ Standards Committee meetings in Oulu, Finland. This post focuses on the sessions of SG1 (the standards committee sub-group 1 - for concurrency and parallelism) as well as on coroutines-related sessions. Jason already gave an overview of the meeting in his post . SG1 prioritized proposals and issues affecting the (expected) C++17 standard, followed by proposals targeting the Concurrency TS or a future revision of the Parallelism TS. We also made some...

What is new in OpenMP 4.5
Article

What is new in OpenMP 4.5

Jakub Jelínek

A new version of the OpenMP standard, 4.5, has been released in November 2015 and brings several new constructs to the users. OpenMP is an API consisting of compiler directives and library routines for high level parallelism in C, C++ and Fortran programs. The upcoming version of GCC adds support for this newest version of the standard. This post highlights some of the latest features, changes, and "gotcha's" to look out for. Taskloop construct Diving right in, the 'taskloop' construct...

Article Thumbnail
Article

Come and hear about Developer Toolset at Red Hat Summit and Developer Exchange

Matt Newsome

As a C, C++, or Fortran developer, you want easy access to supported versions of the latest and greatest tools, features and standards support. You also want to write and test your application once for deployment to multiple versions of Red Hat Enterprise Linux. At Red Hat Summit this year I'll be giving a talk on our latest development tools, including news on Red Hat Developer Toolset . Your first opportunity to hear that talk, however, will be at the...