scudo: Fix MTE error reporting for zero-sized allocations.
authorPeter Collingbourne <peter@pcc.me.uk>
Thu, 13 May 2021 20:55:16 +0000 (13:55 -0700)
committerPeter Collingbourne <peter@pcc.me.uk>
Fri, 14 May 2021 01:14:03 +0000 (18:14 -0700)
commitf79929aceae966f9419cfc00c275e5e60bd0ee54
tree771d494d938a57bbb338001c032442ded5e0d97f
parent9567131d03650bbaa82251f173bd6959e04d471d
scudo: Fix MTE error reporting for zero-sized allocations.

With zero-sized allocations we don't actually end up storing the
address tag to the memory tag space, so store it in the first byte of
the chunk instead so that we can find it later in getInlineErrorInfo().

Differential Revision: https://reviews.llvm.org/D102442
compiler-rt/lib/scudo/standalone/combined.h