This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/19120] kbuild warnings on RHEL5
- From: "mcermak at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Tue, 13 Oct 2015 10:53:19 +0000
- Subject: [Bug translator/19120] kbuild warnings on RHEL5
- Auto-submitted: auto-generated
- References: <bug-19120-6586 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=19120
--- Comment #2 from Martin Cermak <mcermak at redhat dot com> ---
Those warnings come from fullpath_struct_path(). A smaller reproducer is:
=======
stap -e 'probe oneshot { println
(fullpath_struct_path(task_cwd_path(task_current()))) } '
=======
Which passes on rhel6+ and fail on my rhel5 running 2.6.18-398.el5. However,
task_cwd_path() is *supposed* to return null:
=======
function task_cwd_path:long(task:long)
%{ /* pure */
... stuff deleted ...
if (task->fs) {
// Sigh. On kernels before 2.6.25, the task->fs->pwd
// structure exists, but isn't a 'path'
// structure. Instead it is a 'dentry' structure. The
// 'pwd' and 'pwdmnt' (which is a 'vfsmount'
// structure) variables would both be needed to get a
// pathname. However, this function can't return 2
// items or really declare a static 'path' structure
// to put the 2 pointers in.
//
// So, on those RHEL5-era kernels, we'll just return
// NULL here.
... stuff deleted ...
=======
The fullpath_struct_path() might pick one of linux/path.h or linux/nfs_fs.h
using @choose_defined() for the cast. Nevertheless that would neither suppress
those warnings, nor make task_paths.stp pass since task_cwd_path() will still
return null on such old kernel.
So maybe the best way would be to use autoconf-dpath-path.c which sets
STAPCONF_DPATH_PATH and let it drive the behavior of fullpath_struct_path()
making it return null on such old kernels.
--
You are receiving this mail because:
You are the assignee for the bug.