[SERVER-1259] replace "assert" with "verify" Created: 19/Jun/10 Updated: 12/Jul/16 Resolved: 26/Mar/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 2.1.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Johannes Wienke | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Independent of linux or windows. |
||
| Operating System: | ALL |
| Participants: |
| Description |
|
Current nightly build redefines assert in assert_util.h: #ifdef assert #define MONGO_assert(Expression) (void)( (!!(_Expression)) || (mongo::asserted(#_Expression, __FILE, __LINE_), 0) ) This may break compilation because the redefinition doesn't always behave like e.g. the gcc linux implementation. asert_util.h is included thorugh dbclient.h etc., so the redefinition affects client applications. I had to change the include order to get back the normal assert behaviour. |
| Comments |
| Comment by auto [ 26/Mar/12 ] |
|
Author: {u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}Message: fail to build if you use a bare assert |
| Comment by auto [ 26/Mar/12 ] |
|
Author: {u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}Message: fix --dd build after assert change |
| Comment by auto [ 26/Mar/12 ] |
|
Author: {u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}Message: replace assert with verify |
| Comment by auto [ 26/Mar/12 ] |
|
Author: {u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}Message: |
| Comment by auto [ 26/Mar/12 ] |
|
Author: {u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}Message: |
| Comment by auto [ 26/Mar/12 ] |
|
Author: {u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}Message: |
| Comment by auto [ 26/Mar/12 ] |
|
Author: {u'login': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}Message: |
| Comment by auto [ 26/Mar/12 ] |
|
Author: {u'login': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}Message: To be followed with a bulk replace of "assert" with "verify" after the error codes are gone. |
| Comment by Eliot Horowitz (Inactive) [ 30/May/11 ] |
|
We are starting to use verify internally, but won't wholesale replace until 2.1 |
| Comment by auto [ 30/May/11 ] |
|
Author: {u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}Message: add verify( <code> , <test> ) |