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: https://github.com/boostorg/endian/issues/21 with
a proposed patch here: https://github.com/boostorg/endian/pull/22

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:
https://github.com/boostorg/endian/pull/24

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

thanks!

-- 
Arvid Norberg

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk