[Mesa-dev] [PATCH 0/5] Fix member access within null pointer reported by UBSAN

Emil Velikov emil.l.velikov at gmail.com
Fri Feb 10 10:51:26 UTC 2017

Hi Bartosz,

On 7 February 2017 at 18:34, Bartosz Tomczyk
<bartosz.tomczyk86 at gmail.com> wrote:
> Series fix various null pointer derefeneces repored by UBSAN.
> Found by running piglit tests.
As mentioned in 1/5 these are not actual issues as the compiler (and
thus sanitizer) should _not_ dereference the pointer(s) but do
arithmetic on it(them).
I've seen various tools in the past flag such code as problematic
(with latest one being clang, iirc), so "fixing" them isn't that bad
of idea.

Just a friendly request: please reach out to the UBSAN people so that
they can correct these false-positives on their end.

On the patches in question: please follow the existing coding style.
Expressions like [1] should be split in separate lines [2].

if (foo) bar = bbar;

if (foo)
   bar = bbar;


More information about the mesa-dev mailing list