[PATCH] ctdb-common: Fix aliasing issue in IPv6 checksum (bug 13588)
amitay at gmail.com
Fri Aug 24 07:12:26 UTC 2018
On Thu, Aug 23, 2018 at 1:27 PM Martin Schwenke via samba-technical
<samba-technical at lists.samba.org> wrote:
> Since commit 9c51b278b1700cd5f3e2addc19b7c711cc2ea10b the compiler has
> been able to inline the affected call to uint16_checksum(). Given
> that the data (phdr) is being accessed by an incompatible
> pointer (data) there is an aliasing problem when the call is inlined.
> This results in incorrect behaviour with -O2/-O3 when compiling with
> at least GCC 6, 7, and 8.
> Fix this by making the types compatible.
> Also fixes CID 1437604 (Reliance on integer endianness). This is a
> false positive because the uint16_checksum doesn't depend on the order
> of the input uint16_t items.
> Please review and maybe push...
Pushed to autobuild.
More information about the samba-technical