OSDN Git Service
(root)
/
android-x86
/
system-extras.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
edb1884
)
simpleperf: fix a check error.
author
Yabin Cui
<yabinc@google.com>
Tue, 22 Nov 2016 23:32:03 +0000
(15:32 -0800)
committer
Yabin Cui
<yabinc@google.com>
Tue, 22 Nov 2016 23:35:04 +0000
(15:35 -0800)
Bug: None.
Test: `simpleperf record` a sleep process.
Change-Id: I334e9fb857743c63bf0a0b4b50f1a723d47ba6e7
simpleperf/record_file_writer.cpp
patch
|
blob
|
history
diff --git
a/simpleperf/record_file_writer.cpp
b/simpleperf/record_file_writer.cpp
index
802a66d
..
fe62ab5
100644
(file)
--- a/
simpleperf/record_file_writer.cpp
+++ b/
simpleperf/record_file_writer.cpp
@@
-355,7
+355,8
@@
bool RecordFileWriter::WriteFeatureEnd(int feature) {
}
bool RecordFileWriter::EndWriteFeatures() {
- CHECK_LE(feature_count_, features_.size());
+ // Used features (features_.size()) should be <= allocated feature space.
+ CHECK_LE(features_.size(), feature_count_);
if (fseek(record_fp_, feature_section_offset_, SEEK_SET) == -1) {
PLOG(ERROR) << "fseek() failed";
return false;