]> granicus.if.org Git - strace/commitdiff
prctl: print pointer returned by PR_GET_TID_ADDRESS as kernel long
authorEugene Syromyatnikov <evgsyr@gmail.com>
Sun, 11 Dec 2016 21:12:27 +0000 (00:12 +0300)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 26 Dec 2016 16:43:40 +0000 (16:43 +0000)
Since there is no compat handler for x32/n32, kernel returns kernel's
long as a result of the call.

Interesting, does any callee out there actually care to have enough room
allocated for kernel long?

* prctl.c (SYS_FUNC(prctl)): Use printnum_kptr instead of printnum_ptr
to print the value stored at address pointed by addr2 argument
of PR_GET_TID_ADDRESS operation.

prctl.c

diff --git a/prctl.c b/prctl.c
index dede4c9dc32f5ef2b984dda5273b9adb19f85b14..6779ad5100a42b0d5574910ad34f5e1aee5d6c85 100644 (file)
--- a/prctl.c
+++ b/prctl.c
@@ -151,7 +151,7 @@ SYS_FUNC(prctl)
                if (entering(tcp))
                        tprints(", ");
                else
-                       printnum_ptr(tcp, arg2);
+                       printnum_kptr(tcp, arg2);
                break;
 
        case PR_GET_TSC: