Make the circular buffer reader code safer.

RESOLVED FIXED in mozilla13

Status

()

Core
Gecko Profiler
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: jrmuizel, Assigned: jrmuizel)

Tracking

Trunk
mozilla13
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
Created attachment 596399 [details] [diff] [review]
Make the circular buffer reader code safer.
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)
(Assignee)

Comment 2

6 years ago
Created attachment 596407 [details] [diff] [review]
A more reviewable version.

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.

Updated

6 years ago
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
Last Resolved: 6 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.