This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/13842] aggressive cast accessor function merging gives confusing error messages


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]