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 tapsets/14353] more than 1 syscall.dup2 probe alias in syscalls.stp


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

Mark Wielaard <mjw at redhat dot com> changed:

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

--- Comment #1 from Mark Wielaard <mjw at redhat dot com> 2012-07-11 20:35:50 UTC ---
(In reply to comment #0)
> There are two syscall.dup2 probe aliases (and 2 return probe aliases) in
> syscalls.stp:
> 
> ====
> # dup2 _______________________________________________________
> # long sys_dup2(unsigned int oldfd, unsigned int newfd)
> # Only handles corner case, others handled by dup3.
> probe syscall.dup2 = kernel.function("sys_dup2").call
> {
>         if ($oldfd != $newfd) next;
> [...]
> }
> probe syscall.dup2.return = kernel.function("sys_dup2").return
> {
>         if ($oldfd != $newfd) next;
> [...]
> }
> 
> # dup3 (handles both dup2 and dup3 except for corner case)___________
> # long sys_dup2(unsigned int oldfd, unsigned int newfd)
> # SYSCALL_DEFINE3(dup3, unsigned int, oldfd, unsigned int, newfd, int, flags)
> probe syscall.dup2 = kernel.function("sys_dup3").call !,
>                      kernel.function("sys_dup2").call
> {
> [...]
>         # Corner case handled by dup2
>         if ($oldfd == $newfd && flags == 0) next
> [...]
> }
> 
> probe syscall.dup2.return = kernel.function("sys_dup3").return !,
>                             kernel.function("sys_dup2").return
> {
> [...]
>         # Corner case handled by dup2
>         if ($oldfd == $newfd && flags == 0) next
> [...]
> }
> ====
> 
> This might be the result of a cut-and-paste error.

No, it was deliberate. See commit 816395. It contains a testcase for the weird
corner case that it is supposed to handle.

-- 
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]