<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="">In debug builds, in addition to a backtrace, don’t assertions already provide a text description and a line number?<div class=""><br class=""></div><div class="">Perhaps we need a more searchable way to record these fields in our bug tracking databases. But it’s not immediately clear to me why adding a third field would help.<br class=""><div class=""><br class=""></div><div class="">Geoff</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Nov 6, 2014, at 11:19 AM, Said Abou-Hallawa <<a href="mailto:sabouhallawa@apple.com" class="">sabouhallawa@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div 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></div>_______________________________________________<br class="">webkit-dev mailing list<br class=""><a href="mailto:webkit-dev@lists.webkit.org" class="">webkit-dev@lists.webkit.org</a><br class="">https://lists.webkit.org/mailman/listinfo/webkit-dev<br class=""></div></blockquote></div><br class=""></div></div></body></html>