Closed Bug 726369 Opened 8 years ago Closed 8 years ago

Make the circular buffer reader code safer.

Categories

(Core :: Gecko Profiler, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: jrmuizel, Assigned: jrmuizel)

References

Details

Attachments

(1 file, 1 obsolete file)

No description provided.
Attachment #596399 - Flags: review?(bgirard)
Comment on attachment 596399 [details] [diff] [review]
Make the circular buffer reader code safer.

Patch is missing, headers only
Attachment #596399 - Flags: review?(bgirard)
A more reviewable version.
Attachment #596399 - Attachment is obsolete: true
Attachment #596407 - Flags: review?(bgirard)
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
Attachment #596407 - Flags: review?(bgirard) → review+
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.
Blocks: 734691
Fixed my and Markus' comments.

https://hg.mozilla.org/integration/mozilla-inbound/rev/d223a5698a08
Assignee: nobody → jmuizelaar
https://hg.mozilla.org/mozilla-central/rev/d223a5698a08
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.