<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">This will add a step that developers will have to remember when changing an ASSERT. There may be developers that want to knowingly keep the same tag. What about creating my own tag values? How will we guard against reusing a tag?</div><div class=""><br class=""></div>So what would be an appropriate tag for an ASSERT in a templated class that is in a .h file? An example would be the at() method in Vector.h:<div class=""><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""> T& at(Checked<size_t> i)</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""> <span style="font-variant-ligatures: no-common-ligatures; background-color: #00e6e5" class="">{</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""> RELEASE_ASSERT(i < size());</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""> return Base::buffer()[i];</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""> <span style="font-variant-ligatures: no-common-ligatures; background-color: #00e6e5" class="">}</span></div></div><div class="">I question having hundreds of ASSERTs in the code all with the same tag provides any benefit. These identically tagged ASSERTs are for guarding against unrelated out-of-bounds access checks.</div><div class=""><br class=""></div><div class="">If you say that we aren’t going to handle RELEASE_ASSERTs, these are the asserts that developers have said are the most important, in that we want to assert in a production build. In fact you might have an argument for tagging RELEASE_ASSERTs if we think it would improve debugging post release crashes.</div><div class=""><br class=""></div><div class="">- Michael</div><div class=""><div class=""><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On Nov 6, 2014, at 12:34 PM, Said Abou-Hallawa <<a href="mailto:sabouhallawa@apple.com" class="">sabouhallawa@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">When the logical expression in the ASSERT is changed, you should do the following:<br class=""><br class="">- ASSERT_TAG(condition, “abcde”);<br class="">+ ASSERT(new_condition);<br class=""><br class="">Then the pre-build tagging tool will generate a new tag for the new assertion:<br class=""><br class="">+ ASSERT(new_condition, “fghij”);<br class=""><br class="">So the assertions do not get messed up with Bugzailla.<br class=""><br class="">The pre-build tool runs periodically only on Bot, maybe once every day and only on the touched files since it was last run. Then it commits only the changed files because of tagging. This should not add much to the build process.<br class=""><br class="">Both ASSERT and ASSERT_TAG should be supported. Since the developer should only add ASSERT and leave the tagging for the pre-build tagging tool.<br class=""><br class=""></div></blockquote></div><br class=""></div></div></div></body></html>