Bug 47057

Summary: ASSERT(m_state = Open); is bad news bears
Product: WebKit Reporter: Adam Barth <abarth>
Component: New BugsAssignee: Adam Barth <abarth>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, darin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Attachments:
Description Flags
Patch zecke: review+

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]
Patch
Comment 2 Holger Freyther 2010-10-03 02:20:11 PDT
Comment on attachment 69586 [details]
Patch

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!