tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 449aa2cf94274a1ffbf006027ee686990b813219
parent 5ff0981186fe5bb4aebe080ec93104c5944fda6e
Author: serge-sans-paille <sguelton@mozilla.com>
Date:   Thu, 16 Oct 2025 19:31:58 +0000

Bug 1990430 - Make AutoBuffer trivially copyable r=emilio

This was not the case before due to a user-defined destructor. This
fixes the miscompilation by GCC 15.x, but I'm unsure if it was an actual
miscompilation or a consequence of us doing something UB with a
non-trivial type.

Differential Revision: https://phabricator.services.mozilla.com/D268839

Diffstat:
Mxpcom/ds/nsTArray.h | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xpcom/ds/nsTArray.h b/xpcom/ds/nsTArray.h @@ -2972,7 +2972,7 @@ class MOZ_NON_MEMMOVABLE MOZ_GSL_OWNER AutoTArray : public nsTArray<E> { char mStorage[sizeof(value_type) * N]; }; AutoBuffer() : mHdr{.mLength = 0, .mCapacity = N, .mIsAutoArray = true} {} - ~AutoBuffer() {} + ~AutoBuffer() = default; } mAutoBuf; static_assert(offsetof(AutoBuffer, mStorage) == sizeof(nsTArrayHeader), "Shouldn't have padding");