Blame SOURCES/rhbz1966742.patch
|
|
8cfd26 |
commit 87221aeb66e3e3475bf6df77cc7b6338313d0946
|
|
|
8cfd26 |
Author: Ding Hui <dinghui@sangfor.com.cn>
|
|
|
8cfd26 |
Date: Fri Nov 27 13:27:34 2020 -0500
|
|
|
8cfd26 |
|
|
|
8cfd26 |
PR26958: avoid null-deref in buildid verification failure diagnostic
|
|
|
8cfd26 |
|
|
|
8cfd26 |
We can't traverse tsk-> if it's NULL.
|
|
|
8cfd26 |
|
|
|
8cfd26 |
Tested by <fche> on hand-modified "stap -kp4" stap-symbols.c file.
|
|
|
8cfd26 |
|
|
|
8cfd26 |
diff --git a/runtime/sym.c b/runtime/sym.c
|
|
|
8cfd26 |
index a51f08c9e..521aebe48 100644
|
|
|
8cfd26 |
--- a/runtime/sym.c
|
|
|
8cfd26 |
+++ b/runtime/sym.c
|
|
|
8cfd26 |
@@ -735,7 +735,7 @@ static int _stp_build_id_check (struct _stp_module *m,
|
|
|
8cfd26 |
// we make sure below is really a warning.
|
|
|
8cfd26 |
_stp_warn ("Build-id mismatch [man warning::buildid]: \"%s\" pid %ld address "
|
|
|
8cfd26 |
"%#lx, expected %s actual %s\n",
|
|
|
8cfd26 |
- m->path, (long) tsk->tgid,
|
|
|
8cfd26 |
+ m->path, (long) (tsk ? tsk->tgid : 0),
|
|
|
8cfd26 |
notes_addr, hexstring_theory, hexstring_practice);
|
|
|
8cfd26 |
return 1;
|
|
|
8cfd26 |
}
|