Skip to content

Commit

Permalink
fix(ebpf): Use uint64 for proc offset (#3656)
Browse files Browse the repository at this point in the history
Signed-off-by: Mahendra Paipuri <mahendra.paipuri@gmail.com>
  • Loading branch information
mahendrapaipuri authored Oct 30, 2024
1 parent ba4b92d commit 47edcbb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion ebpf/symtab/proc.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ func (p *ProcTable) Refresh() {
p.err = p.refreshProcMap(procMaps)
if p.err != nil {
_ = level.Error(p.logger).Log("err", p.err)
} else {
}
}

Expand Down
4 changes: 2 additions & 2 deletions ebpf/symtab/procmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ type ProcMap struct {
// The permissions for this mapping
Perms *ProcMapPermissions
// The current offset into the file/fd (e.g., shared libs)
Offset int64
Offset uint64
// Device owner of this mapping (major:minor) in Mkdev format.
Dev uint64
// The inode of the device above
Expand Down Expand Up @@ -246,7 +246,7 @@ func ParseProcMapLine(line []byte, executableOnly bool) (*ProcMap, error) {
return nil, err
}

offset, err := strconv.ParseInt(tokenToStringUnsafe(offsetBytes), 16, 0)
offset, err := strconv.ParseUint(tokenToStringUnsafe(offsetBytes), 16, 0)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 47edcbb

Please sign in to comment.