[webkit-dev] Tagged assertions...

Geoffrey Garen ggaren at apple.com
Thu Nov 6 11:34:24 PST 2014


In debug builds, in addition to a backtrace, don’t assertions already provide a text description and a line number?

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.

Geoff

> On Nov 6, 2014, at 11:19 AM, Said Abou-Hallawa <sabouhallawa at apple.com> wrote:
> 
> 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.
> 
> I have a suggestion for this.
> 
> 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:
> 
> 	ASSERT(condition);
> 
> The pre-build tool will change it to be:
> 
> 	ASSERT_TAG(condition, “abcde”);
> 
> 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.
> 
> When the assertion fires, the dump may look like the following:
> 
> 	ASSERTION FAILED (tag: abcde) condition
> 	… rest of the call-stack
> 
> 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:
> 
> 	Product: 		WebKit
> 	Summary: 	ASSERTION failed in someFunction
> 	Assertion tag: 	abcde
> 	Description:
> 	Attachment:
> 
> 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:
> 
> 	Status:		All
> 	Product:		WebKit
> 	Words:
> 	Assertion tag:	abcde
> 
> This search will bring me all the opened bugs in WebKit which has the assertion tag = “abcde” if there is any.
> 
> 	ID		Product		Comp	Assignee	Status	Resolution 	Assertion tag 	Summary
> 	12345	WebKit												abcde			ASSERTION failed in someFunction
> 
> Thanks,
> Said
> 
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20141106/fd561532/attachment.html>


More information about the webkit-dev mailing list