ldd: cancel on decoder error
All checks were successful
Test / Create distribution (push) Successful in 34s
Test / Sandbox (push) Successful in 2m20s
Test / Hakurei (push) Successful in 3m14s
Test / Hpkg (push) Successful in 4m8s
Test / Sandbox (race detector) (push) Successful in 4m22s
Test / Hakurei (race detector) (push) Successful in 5m7s
Test / Flake checks (push) Successful in 1m28s
All checks were successful
Test / Create distribution (push) Successful in 34s
Test / Sandbox (push) Successful in 2m20s
Test / Hakurei (push) Successful in 3m14s
Test / Hpkg (push) Successful in 4m8s
Test / Sandbox (race detector) (push) Successful in 4m22s
Test / Hakurei (race detector) (push) Successful in 5m7s
Test / Flake checks (push) Successful in 1m28s
This prevents blocking from failures caused by ldd(1) emitting output that is not anticipated by the decoder. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -68,6 +68,11 @@ func Exec(ctx context.Context, msg message.Msg, p string) ([]*Entry, error) {
|
||||
}
|
||||
|
||||
entries, decodeErr := d.Decode()
|
||||
if decodeErr != nil {
|
||||
// do not cancel on successful decode to avoid racing with ldd(1) termination
|
||||
cancel()
|
||||
}
|
||||
|
||||
if err := z.Wait(); err != nil {
|
||||
m := stderr.Bytes()
|
||||
if bytes.Contains(m, []byte(msgStaticSuffix)) || bytes.Contains(m, []byte(msgStaticGlibc)) {
|
||||
|
||||
Reference in New Issue
Block a user