Quantcast
Browsing all 63 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

More UB madness from LLVM/Clang

Via @johnregehr this further tale of  compiler “optimizations” that break correct C code without even a warning by deleting a necessary null pointer check. In this example, Bar contains a stack of...

View Article


Image may be NSFW.
Clik here to view.

Pointer alias analysis in C

Perhaps there is some reason to provide a mechanism for asserting, in a particular patch of code, that the compiler is free to make optimistic assumptions about the kinds of aliasing that can occur. I...

View Article


Torvalds on aliasing

See also pointer alias in C and Depressing and faintly terrifying days for the C standard. From: LKML From Linus Torvalds <> Date Tue, 5 Jun 2018 10:30:21 -0700 Subject Re: [GIT PULL] Device...

View Article

Three modest proposals for the C standard WG14

  1. Proposal on Undefined Behavior. Rationale: This Standard definition of “undefined behavior”, like the rest of the Standard, relies on an implicit expectation that implementations are cooperating...

View Article

Image may be NSFW.
Clik here to view.

Spanner in the works

The developers of Google’s Spanner database built an interesting system but chose to build their own clock synchronization technology instead of getting a more precise off the shelf solution and chose...

View Article


The C Standard and GCC/Clang are an active safety and security danger

Code controlling a device – a medical instrument, a power plant,  an airplane,  perfectly working and thoroughly tested code can be turned into garbage if someone runs a new version of a C compiler or...

View Article

Image may be NSFW.
Clik here to view.

undefined behavior and the purpose of C

The C programming language, by design, permits programmers to work  at both low and high level. In particular, for applications like operating system development,  cryptography,  numerical methods, and...

View Article

Vector optimization with C aliasing

One of the common defenses of the abuse of “undefined behavior” by C compilers, and the stupid aliasing rules in the standard is that those things are necessary for optimizations, like using vector...

View Article


Practical uses of synchronized clocks -Liskov

From 1991, Barbara Liskov looked at the implications for distributed computing when synchronized clocks are available. PracticalUseOfClocks

View Article


Image may be NSFW.
Clik here to view.

Semiotics of functional programming

In contrast to the usual imperative languages (e.g., C, Fortran, and Ada), in which variables represent cells in memory that can be modified using the assignment operator = (or  :=), functional...

View Article

Image may be NSFW.
Clik here to view.

Concurrency

\(\newcommand{\ess}{Initial} \) Michel Charpentier provides a nice example of a simple, flawed, producer/consumer buffer implementation. The fundamental problem could be discovered by doing a Stack...

View Article

Paxos demystified

paxos2019october Download

View Article

Depressing and faintly terrifying days for the C standard

C STANDARD UNDEFINED BEHAVIOR VERSUS WITTGENSTEIN 1. DEPRESSING AND FAINTLY TERRIFYING Chris Lattner, the architect of the Clang/LLVM C compiler explained the effects of the C standard’s “undefined...

View Article


An informal method

Download informal

View Article

C89 Standard

A text version of a non-final draft is below.  Here’s the pdf of the final version. (This foreword is not a part of American National Standard for Information Systems --- Programming Language C,...

View Article


Dennis Ritchie on alias analysis in the C programming language 1988

This 1998 note by Dennis Ritchie from comp.lang.c  (and also  here ) is very current since the concept of noalias has definitely crept back into the standard. I have reproduced it verbatim, but lightly...

View Article

C is not a serious programming language

The C Standards process over the last few decades has addressed both optimization and pointer type safety largely through a concept called “undefined behavior”.  The idea is that instead of  positive...

View Article


Undefined behavior in C is a reading error.

Considering how important “undefined behavior” has become to C semantics and the ISO/IEC JTC1/SC22/WG14 Committee, the lack of any reference to it in the K&R ANSI book is notable and the...

View Article

Image may be NSFW.
Clik here to view.

Dissing the PDP11

In computer science academia, C  along with UNIX, and PDP11s, is as unfashionable as can be: the equivalent of other 1970’s relics, like polyester leisure suits and mullets. In 2018 ACM Queue published...

View Article

Memory model and semantics for C

A perceptive note from Linus Torvalds about the C/C++ “memory model” is reproduced below. From Linus Torvalds <> Date Thu, 7 Jun 2018 08:40:49 -0700 Subject Re: LKMM litmus test for Roman...

View Article
Browsing all 63 articles
Browse latest View live