Boost logo

Boost :

Subject: [boost] [endian] undefined behaviour in boost.endian
From: Arvid Norberg (arvid.norberg_at_[hidden])
Date: 2017-12-20 16:13:51

Hi, I've submitted an issue to the github project for boost.endian. I'm
starting to wonder if this is in fact not the preferred channel for
reporting issues.

There are at least two separate issues causing undefined behaviour to be
invoked in boost.endian.

The first one is fundamentally based on the assumption that if the target
architecture is x86, the C++ alignment requirements don't apply. I've
posted more details here: with
a proposed patch here:

The second issue involves shifting negative integers, both invoking
implementation defined and undefined behaviour. I don't have a patch to fix
the issue, just to extend the tests to exercise the problem, which is then
detectible with the undefined behaviour sanitizer. Patch is here:

I would really appreciate it if someone could review these and/or suggest a
better venue than github to propose patches.


Arvid Norberg

Boost list run by bdawes at, gregod at, cpdaniel at, john at