public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "mcermak at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug tapsets/18597] long_arg() doesn't correctly handle negative values in 32-on-64 environment
Date: Thu, 25 Jun 2015 15:03:00 -0000	[thread overview]
Message-ID: <bug-18597-6586-JV9MXfQaRk@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-18597-6586@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=18597

--- Comment #2 from Martin Cermak <mcermak at redhat dot com> ---
> =======
> $ git diff tapset/x86_64/registers.stp | nl
>      1  diff --git a/tapset/x86_64/registers.stp
> b/tapset/x86_64/registers.stp
>      2  index d7035e4..e662f9e 100644
>      3  --- a/tapset/x86_64/registers.stp
>      4  +++ b/tapset/x86_64/registers.stp
>      5  @@ -167,7 +167,7 @@ function _stp_arg:long (argnum:long,
> sign_extend:long, truncate:long) %{ /* pure
>      6          default:
>      7                  goto bad_argnum;
>      8          }
>      9  -       if (STAP_ARG_truncate || argsz == sizeof(int)) {
>     10  +       if (STAP_ARG_truncate || _stp_is_compat_task()) {
>     11                  if (STAP_ARG_sign_extend)
>     12                          STAP_RETVALUE = (int64_t)
> __stp_sign_extend32(val);
>     13                  else
>     14  @@ -215,12 +215,7 @@ function ulong_arg:long (argnum:long) {
>     15   }
>     16   
>     17   function longlong_arg:long (argnum:long) {
>     18  -       if (probing_32bit_app()) {
>     19  -               lowbits = _stp_arg(argnum, 0, 1)
>     20  -               highbits = _stp_arg(argnum+1, 0, 1)
>     21  -               return ((highbits << 32) | lowbits)
>     22  -       } else
>     23  -               return _stp_arg(argnum, 0, 0)
>     24  +       return _stp_arg(argnum, 0, 0)
>     25   }
>     26   
>     27   function ulonglong_arg:long (argnum:long) {
> $ 
> =======
> 
> Lines 18-23 are just removal of redundant code that, based on my testing, appears to never be used ... stuff deleted ...

Actually, I am not sure about user scripts. If there is a risk this might break
them, then lines 18-26 (and respective snippets for powerpc and s390) can stay
in place. It is not directly related to the reported issue. Maybe I shouldn't
have mixed these two independent things here.

-- 
You are receiving this mail because:
You are the assignee for the bug.

  parent reply	other threads:[~2015-06-25 15:03 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-25 11:00 [Bug tapsets/18597] New: " mcermak at redhat dot com
2015-06-25 11:03 ` [Bug tapsets/18597] " mcermak at redhat dot com
2015-06-25 11:04 ` mcermak at redhat dot com
2015-06-25 15:03 ` mcermak at redhat dot com [this message]
2015-06-26 12:13 ` dsmith at redhat dot com
2015-06-26 12:20 ` dsmith at redhat dot com
2015-06-30 15:56 ` dsmith at redhat dot com
2015-06-30 15:59 ` dsmith at redhat dot com
2015-06-30 17:21 ` jistone at redhat dot com
2015-06-30 17:36 ` dsmith at redhat dot com
2015-06-30 20:21 ` dsmith at redhat dot com
2015-06-30 20:22 ` dsmith at redhat dot com
2015-06-30 20:32 ` jistone at redhat dot com
2015-06-30 20:46 ` dsmith at redhat dot com
2015-07-01 15:21 ` mcermak at redhat dot com
2015-07-01 16:14 ` dsmith at redhat dot com
2015-07-01 17:10 ` mcermak at redhat dot com
2015-07-01 17:29 ` dsmith at redhat dot com
2015-07-03 14:18 ` mcermak at redhat dot com
2015-07-06 13:45 ` dsmith at redhat dot com
2015-07-07  7:02 ` mcermak at redhat dot com
2015-07-08  6:09 ` mcermak at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-18597-6586-JV9MXfQaRk@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).