Last Comment Bug 726369 - Make the circular buffer reader code safer.
: Make the circular buffer reader code safer.
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Gecko Profiler (show other bugs)
: Trunk
: x86 Mac OS X
: -- normal (vote)
: mozilla13
Assigned To: Jeff Muizelaar [:jrmuizel]
:
Mentors:
Depends on:
Blocks: 734691
  Show dependency treegraph
 
Reported: 2012-02-11 15:59 PST by Jeff Muizelaar [:jrmuizel]
Modified: 2012-03-11 19:58 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Make the circular buffer reader code safer. (156 bytes, patch)
2012-02-11 15:59 PST, Jeff Muizelaar [:jrmuizel]
no flags Details | Diff | Splinter Review
A more reviewable version. (1.46 KB, patch)
2012-02-11 17:48 PST, Jeff Muizelaar [:jrmuizel]
b56girard: review+
Details | Diff | Splinter Review

Description Jeff Muizelaar [:jrmuizel] 2012-02-11 15:59:18 PST
Created attachment 596399 [details] [diff] [review]
Make the circular buffer reader code safer.
Comment 1 Benoit Girard (:BenWa) 2012-02-11 16:31:58 PST
Comment on attachment 596399 [details] [diff] [review]
Make the circular buffer reader code safer.

Patch is missing, headers only
Comment 2 Jeff Muizelaar [:jrmuizel] 2012-02-11 17:48:43 PST
Created attachment 596407 [details] [diff] [review]
A more reviewable version.

A more reviewable version.
Comment 3 Benoit Girard (:BenWa) 2012-02-11 18:48:15 PST
Comment on attachment 596407 [details] [diff] [review]
A more reviewable version.

Review of attachment 596407 [details] [diff] [review]:
-----------------------------------------------------------------

r+ with this changed

::: tools/profiler/TableTicker.cpp
@@ -280,1 +277,1 @@
> >      while (mReadPos != mLastFlushPos) {

Infinite loop: mReadPos -> readPos
Comment 4 Markus Stange [:mstange] 2012-03-07 11:39:35 PST
Comment on attachment 596407 [details] [diff] [review]
A more reviewable version.

>       profile.Append(mEntries[mReadPos].TagToString(this).c_str());

This mReadPos needs to be changed, too.
Comment 5 Benoit Girard (:BenWa) 2012-03-10 18:17:19 PST
Fixed my and Markus' comments.

https://hg.mozilla.org/integration/mozilla-inbound/rev/d223a5698a08
Comment 6 Daniel Holbert [:dholbert] 2012-03-11 19:58:48 PDT
https://hg.mozilla.org/mozilla-central/rev/d223a5698a08

Note You need to log in before you can comment on or make changes to this bug.