public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "jistone at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug translator/13842] aggressive cast accessor function merging gives confusing error messages
Date: Wed, 14 Mar 2012 01:15:00 -0000	[thread overview]
Message-ID: <bug-13842-6586-vgHwTWqo0r@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-13842-6586@http.sourceware.org/bugzilla/>

http://sourceware.org/bugzilla/show_bug.cgi?id=13842

Josh Stone <jistone at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jistone at redhat dot com

--- Comment #1 from Josh Stone <jistone at redhat dot com> 2012-03-14 01:14:52 UTC ---
(In reply to comment #0)
> - It isn't a "kernel read" really, but a "user space read".

This is because kderef and uderef are sharing the same DEREF_FAULT macro in
runtime/loc2c-runtime.h (and ditto for STORE_DEREF_FAULT).  The actual strings
are subject to localization, found in translate.cxx:translate_runtime().

> - Why does the error message say (addr)?

That's the macro string passed to deref, so embedded-C authors can better tell
which attempt exactly led to failure.  It just happens that loc2c always calls
its pointers "addr", so it's not as useful there.

> - If you switch the v == 1 to v == 0 (or remove the + 1 from v + 1) the error
> message becomes "read fault at 0x          (null) (addr)". weird...

DEREF_FAULT is using the kernel's snprintf, which has this behavior for %p.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

  reply	other threads:[~2012-03-14  1:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-13 22:37 [Bug translator/13842] New: " mjw at redhat dot com
2012-03-14  1:15 ` jistone at redhat dot com [this message]
2012-03-14  1:32 ` [Bug translator/13842] aggressive " jistone 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-13842-6586-vgHwTWqo0r@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).