[webkit-dev] ASSERT vs. RELEASE_ASSERT

Patrick Griffis pgriffis at igalia.com
Mon Apr 1 16:28:07 PDT 2024

On 2024-04-01 16:18, Michael Catanzaro via webkit-dev wrote:
> Hi,
> Just brainstorming, but I generally think it's worth enabling way more assertions in production builds to the extent we can do so without unacceptable performance impact. My ideal would be to rename ASSERT() to SLOW_ASSERT() and then rename RELEASE_ASSERT() to ASSERT(), to make release asserts the "default" type of assert. But I'm not ambitious enough to attempt that. Notably, this would in many cases downgrade the severity of security bugs, since hitting a RELEASE_ASSERT() is at worst a denial of service issue. Curious what other WebKit developers think about this.
> Michael

I'm not suggesting this has the same result as what you propose but I
think it's worth mentioning the CMake build supports `-DENABLE_ASSERTS`
on Release builds now and this was always possible on macOS.

More information about the webkit-dev mailing list