<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="">Recently I ran into an issue where I wanted to find if there is a bug filed against a certain assertion. The only way I was able to use is to search for the name of the function which has the assertion. The function can be overloaded or the function can have more than one assertion. So I found it difficult to track the assertion I am interested in. In future if the function gets renamed, it will be even more difficult.<div class=""><br class=""></div><div class="">I have a suggestion for this.<div class=""><br class=""></div><div class="">A pre-build tool will tag every new assertion after the change is committed. For example in the code I will add the following assertion:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>ASSERT(<i class="">condition</i>);</div><div class=""><br class=""></div><div class="">The pre-build tool will change it to be:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>ASSERT_TAG(<i class="">condition</i>, “abcde”);</div><div class=""><br class=""></div><div class="">where “abcde” is a unique tag in all the source code. A database should be maintained by the build process to keep track what tags are available to be assigned.</div><div class=""><br class=""></div><div class="">When the assertion fires, the dump may look like the following:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>ASSERTION FAILED (tag: abcde) <i class="">condition</i></div><div class=""><i class=""><span class="Apple-tab-span" style="white-space:pre">        </span>… rest of the call-stack</i></div><div class=""><br class=""></div><div class="">In Bugzilla, there should be a field for the assertion tag. If I want to file an assertion bug, I should be filling this field like the following:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>Product: <span class="Apple-tab-span" style="white-space:pre">                </span>WebKit</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>Summary: <span class="Apple-tab-span" style="white-space:pre">        </span>ASSERTION failed in someFunction</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>Assertion tag: <span class="Apple-tab-span" style="white-space:pre">        </span>abcde</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>Description:</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>Attachment:</div><div class=""><br class=""></div><div class="">Later if the assertion fires, from the dump I can know exactly what assertion fired. And more importantly I can search for it easily. In the Bugzilla search page, I should see a field for the assertion tag in the simple search page:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>Status:<span class="Apple-tab-span" style="white-space:pre">                </span>All</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>Product:<span class="Apple-tab-span" style="white-space:pre">                </span>WebKit</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>Words:</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>Assertion tag:<span class="Apple-tab-span" style="white-space:pre">        </span>abcde</div><div class=""><br class=""></div><div class="">This search will bring me all the opened bugs in WebKit which has the assertion tag = “abcde” if there is any.</div><div class=""><br class=""></div><div class=""><b class=""><span class="Apple-tab-span" style="white-space:pre">        </span>ID<span class="Apple-tab-span" style="white-space:pre">                </span>Product<span class="Apple-tab-span" style="white-space:pre">                </span>Comp<span class="Apple-tab-span" style="white-space:pre">        </span>Assignee<span class="Apple-tab-span" style="white-space:pre">        </span>Status<span class="Apple-tab-span" style="white-space:pre">        </span>Resolution <span class="Apple-tab-span" style="white-space:pre">        </span>Assertion tag <span class="Apple-tab-span" style="white-space:pre">        </span>Summary</b></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>12345<span class="Apple-tab-span" style="white-space:pre">        </span>WebKit<span class="Apple-tab-span" style="white-space:pre">                                                                                                </span>abcde<span class="Apple-tab-span" style="white-space:pre">                        </span>ASSERTION failed in someFunction</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Said</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><br class=""></div></div></body></html>