Fix SharedData::AtomicRelease
commitd3535c12d0ddf2f2a80613b1779f44ae7dea13b1
authorMark Williams <mwilliams@fb.com>
Sun, 25 Dec 2016 16:55:23 +0000 (25 08:55 -0800)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Sun, 25 Dec 2016 16:59:53 +0000 (25 08:59 -0800)
treed911700659ba87745b1f7908c1aaf5b0d532beb1
parentf94f00dfa78583b740418e2f40dad50bc34a3615
Fix SharedData::AtomicRelease

Summary:
Its undefined behavior to call delete on a pointer of type SharedData
when the pointer points to an ExtendedSharedData.

If per c++14 we implement a sized global operator delete, it would
receive the wrong size, potentially causing issues (eg if it was
implemented using jemalloc's sdallocx).

Reviewed By: mxw

Differential Revision: D4366430

fbshipit-source-id: de76b79b4fa86efc050030188b4409d7f21d0bbd
hphp/runtime/vm/func.cpp