lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 29 Jul 2019 08:23:57 -0400
From:   Qian Cai <cai@....pw>
To:     David Laight <David.Laight@...LAB.COM>
Cc:     "Moore, Robert" <robert.moore@...el.com>,
        "Wysocki, Rafael J" <rafael.j.wysocki@...el.com>,
        "Schmauss, Erik" <erik.schmauss@...el.com>,
        "jkim@...eBSD.org" <jkim@...eBSD.org>,
        "lenb@...nel.org" <lenb@...nel.org>,
        "ndesaulniers@...gle.com" <ndesaulniers@...gle.com>,
        "linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
        "devel@...ica.org" <devel@...ica.org>,
        "clang-built-linux@...glegroups.com" 
        <clang-built-linux@...glegroups.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] acpica: fix -Wnull-pointer-arithmetic warnings



> On Jul 29, 2019, at 6:24 AM, David Laight <David.Laight@...LAB.COM> wrote:
> 
> From: Moore, Robert
>> Sent: 26 July 2019 20:36
> ...
>> This is because pointer arithmetic
>> on a pointer not pointing to an array is an undefined behavior (C11 6.5.6, constraint 8).
> ...
> 
> The standards committee as smoking dope again :-)
> If that is enforced as a compiler warning/error a lot of code 'breaks'.
> Anything that does:
> 	struct foo *foo = ...;
>      struct bar *bar = (void *)(foo + 1);
> suddenly becomes 'invalid’.

The clang will generate a warning only if “foo" is NULL.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ