From 14a1f64e7e3abd61379b0825f4cf21cf89a0f04d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Mei=C3=9Fner?= Date: Sun, 25 Apr 2021 17:35:07 +0200 Subject: [PATCH] [v3][process][linux] Fix fillFromStatusWithContext() on systems with 128 bit signal masks. --- v3/process/process_linux.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/v3/process/process_linux.go b/v3/process/process_linux.go index f9be594..a8e80b2 100644 --- a/v3/process/process_linux.go +++ b/v3/process/process_linux.go @@ -930,30 +930,45 @@ func (p *Process) fillFromStatusWithContext(ctx context.Context) error { } p.memInfo.Locked = v * 1024 case "SigPnd": + if len(value) > 16 { + value = value[len(value)-16:] + } v, err := strconv.ParseUint(value, 16, 64) if err != nil { return err } p.sigInfo.PendingThread = v case "ShdPnd": + if len(value) > 16 { + value = value[len(value)-16:] + } v, err := strconv.ParseUint(value, 16, 64) if err != nil { return err } p.sigInfo.PendingProcess = v case "SigBlk": + if len(value) > 16 { + value = value[len(value)-16:] + } v, err := strconv.ParseUint(value, 16, 64) if err != nil { return err } p.sigInfo.Blocked = v case "SigIgn": + if len(value) > 16 { + value = value[len(value)-16:] + } v, err := strconv.ParseUint(value, 16, 64) if err != nil { return err } p.sigInfo.Ignored = v case "SigCgt": + if len(value) > 16 { + value = value[len(value)-16:] + } v, err := strconv.ParseUint(value, 16, 64) if err != nil { return err