Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bcc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
bcc
Commits
a09c4913
Commit
a09c4913
authored
May 08, 2017
by
4ast
Committed by
GitHub
May 08, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1155 from palmtenor/perf_map_check
Improve perf map parsing logic
parents
7ea0e6e6
ddf16491
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
src/cc/bcc_perf_map.c
src/cc/bcc_perf_map.c
+6
-2
No files found.
src/cc/bcc_perf_map.c
View file @
a09c4913
...
...
@@ -14,6 +14,8 @@
* limitations under the License.
*/
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
...
...
@@ -82,13 +84,15 @@ int bcc_perf_map_foreach_sym(const char *path, bcc_perf_map_symcb callback,
char
*
newline
,
*
sep
;
begin
=
strtoull
(
cursor
,
&
sep
,
16
);
if
(
*
sep
!=
' '
||
(
sep
==
cursor
&&
begin
==
0
))
if
(
begin
==
0
||
*
sep
!=
' '
||
(
begin
==
ULLONG_MAX
&&
errno
==
ERANGE
))
continue
;
cursor
=
sep
;
while
(
*
cursor
&&
isspace
(
*
cursor
))
cursor
++
;
len
=
strtoull
(
cursor
,
&
sep
,
16
);
if
(
*
sep
!=
' '
||
(
sep
==
cursor
&&
begin
==
0
))
if
(
*
sep
!=
' '
||
(
sep
==
cursor
&&
len
==
0
)
||
(
len
==
ULLONG_MAX
&&
errno
==
ERANGE
))
continue
;
cursor
=
sep
;
while
(
*
cursor
&&
isspace
(
*
cursor
))
cursor
++
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment