This patch does a few cleanup things:
- The non-standalone scudo has a problem where GWP-ASan allocations may not meet alignment requirements where Scudo was requested to have alignment >= 16. Use the new GWP-ASan API to fix this.
- The standalone variant loses some debugging information inside of GWP-ASan because we ask GWP-ASan to allocate an aligned size in the frontend. This means reports end up with 'UaF on a 16-byte allocation' for a 1-byte allocation with 16-byte alignment. Also use the new API to fix this.
- Add post-alloc hooks for GWP-ASan intercepted allocations, and add stats tracking for GWP-ASan allocations.
- Add a small test that checks the alignment of the frontend allocator, so that it can be used under GWP-ASan torture mode.
- Add GWP-ASan torture mode as a testing configuration to catch these regressions.
As-is slight changes still can silently break static initialization.
Lets do D101514.