]> git.eshelyaron.com Git - emacs.git/commit
Make sure that ‘sdata’ objects in ‘sblock’ objects are aligned.
authorPhilipp Stephani <phst@google.com>
Thu, 25 Apr 2019 19:28:46 +0000 (21:28 +0200)
committerPhilipp Stephani <phst@google.com>
Thu, 25 Apr 2019 19:30:12 +0000 (21:30 +0200)
commitfe6c507f5ce0fd744b5bd1d0db6ea175e1188a7f
treef55da6d44458911f708c720ca88df4fec55ad005
parente08e0880f9892fba747abdb95b1f3382ebd17e32
Make sure that ‘sdata’ objects in ‘sblock’ objects are aligned.

Issue found by Clang’s UBSan.

* src/alloc.c (GC_STRING_OVERRUN_COOKIE_SIZE): Increase to 8.
(string_overrun_cookie): Extend accordingly.
(GC_STRING_EXTRA): Ensure that it’s properly aligned for ‘sdata’.
(allocate_string_data): Verify that ‘sdata’ blocks remain aligned.
src/alloc.c