Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Apr 2018 20:24:01 +0000
From:      bugzilla-noreply@freebsd.org
To:        toolchain@FreeBSD.org
Subject:   [Bug 227723] clang 6.0 breaks php56/opcache
Message-ID:  <bug-227723-29464-azRI3bU2bY@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-227723-29464@https.bugs.freebsd.org/bugzilla/>
References:  <bug-227723-29464@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D227723

--- Comment #6 from Dimitry Andric <dim@FreeBSD.org> ---
After some bisecting, it turns out this behavior changed due to the followi=
ng
upstream commit: https://reviews.llvm.org/rL313784 ("Remove offset size che=
ck
in nullptr arithmetic handling") and https://reviews.llvm.org/rL313666 ("Te=
ach
clang to tolerate the 'p =3D nullptr + n' idiom used by glibc").

See also https://reviews.llvm.org/D37042.

What PHP5 is doing is, strictly speaking, undefined behavior, as adding num=
bers
to null pointers is normally not allowed.  In the upstream commit, Andrew
Kaylor has apparently tried to make this work, at least partially, for a few
specific cases used in glibc.

PHP7 and later use a completely different way of storing these variable/num=
ber
hybrids, which is not affected by this, as it apparently avoids any null
pointer arithmetic.

I'll see if I can get some feedback from Andrew on this.

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-227723-29464-azRI3bU2bY>