diff options
author | Alan Modra <amodra@gmail.com> | 2021-09-02 09:05:05 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-09-02 13:48:21 +0930 |
commit | 76aa354424729aafdabdf4929aa9751c6fdee081 (patch) | |
tree | 6f4158b08147ef89e98315304cf5bc4d2f31c013 /binutils | |
parent | c79332d2d13936dfc029a935a9b9823ca0d575c3 (diff) | |
download | gdb-76aa354424729aafdabdf4929aa9751c6fdee081.zip gdb-76aa354424729aafdabdf4929aa9751c6fdee081.tar.gz gdb-76aa354424729aafdabdf4929aa9751c6fdee081.tar.bz2 |
obstack.h __PTR_ALIGN vs. ubsan
Current ubsan complains on every use of __PTR_ALIGN (when ptrdiff_t is
as large as a pointer), due to making calculations relative to a NULL
pointer. This patch avoids the problem by extracting out and
simplifying __BPTR_ALIGN for the usual case. I've continued to use
ptrdiff_t here, where it might be better to throw away __BPTR_ALIGN
entirely and just assume uintptr_t exists.
* obstack.h (__PTR_ALIGN): Expand and simplify __BPTR_ALIGN
rather than calculating relative to a NULL pointer.
Diffstat (limited to 'binutils')
0 files changed, 0 insertions, 0 deletions