Bug 47057 - ASSERT(m_state = Open); is bad news bears
Summary: ASSERT(m_state = Open); is bad news bears
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Adam Barth
Depends on:
Reported: 2010-10-03 02:15 PDT by Adam Barth
Modified: 2010-10-03 11:46 PDT (History)
2 users (show)

See Also:

Patch (1.28 KB, patch)
2010-10-03 02:16 PDT, Adam Barth
zecke: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2010-10-03 02:15:31 PDT
ASSERT(m_state = Open); is bad news bears
Comment 1 Adam Barth 2010-10-03 02:16:59 PDT
Created attachment 69586 [details]
Comment 2 Holger Freyther 2010-10-03 02:20:11 PDT
Comment on attachment 69586 [details]

With gcc 4.5 would write a plugin to inspect basic blocks for ASSERTs... Good catch!!!!
Comment 3 Adam Barth 2010-10-03 02:22:59 PDT
Committed r68986: <http://trac.webkit.org/changeset/68986>
Comment 4 Darin Adler 2010-10-03 10:33:08 PDT
Good to fix, but nearly harmless; the effect is local to the assertion. In a debug build we simply lose the assertion; but if the assertion was true then the statement has no effect. In a release build the expression is not even compiled.
Comment 5 Adam Barth 2010-10-03 11:19:16 PDT
Sure, but the bad case is if the assertion is false.  Then the statement masks the problem in Debug builds, but Release builds behave differently.
Comment 6 Alexey Proskuryakov 2010-10-03 11:46:21 PDT
Good catch!