From 6b3556a6ea2fda31be3a615119d1c8d89452ce36 Mon Sep 17 00:00:00 2001 From: Christopher Ferris Date: Thu, 26 Mar 2026 19:32:56 +0000 Subject: [PATCH] [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. --- compiler-rt/lib/scudo/standalone/common.h | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler-rt/lib/scudo/standalone/common.h b/compiler-rt/lib/scudo/standalone/common.h index aa2903197ae9..b271689a9d25 100644 --- a/compiler-rt/lib/scudo/standalone/common.h +++ b/compiler-rt/lib/scudo/standalone/common.h @@ -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;