[scudo] Add Last entry to ReleaseToOS enum. (#188645)

This allows static asserts to be set in tracing code that might use the
ReleaseToOS values as indexes.

This would have caused a compile failure instead of a runtime crash when
I added the use of a new ReleaseToOS value.
This commit is contained in:
Christopher Ferris 2026-03-26 19:32:56 +00:00 committed by GitHub
parent e9cb7782b4
commit 6b3556a6ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -248,6 +248,7 @@ enum class ReleaseToOS : u8 {
// take.
ForceFast, // Force release pages to the OS, but do it quickly and skip any
// cases where a lock is held by another thread.
Last = ForceFast, // Must be set to the last entry in the enum.
};
constexpr unsigned char PatternFillByte = 0xAB;