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/16514] New: String comparation doesn't work in kprocess.exec probe.


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

            Bug ID: 16514
           Summary: String comparation doesn't work in kprocess.exec
                    probe.
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tapsets
          Assignee: systemtap at sourceware dot org
          Reporter: rhack at redhat dot com

Created attachment 7378
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7378&action=edit
reproducer

Hi all.

I found bug in latest upstream version. Git commit id: 
4a3f6fd344985682cfef906b16b3303bec35c1e3

How to reproduce:

global cmd = "/bin/bash"

probe kprocess.exec {
    printf ("Match: %d\n", filename == cmd);
    if ( filename == cmd ) {
            printf ("We run /bin/bash\n");
    }
}

On new terminal run /bin/bash.

In my case is output:
[root@gremlinka systemtap]# ~/bin/stap --version
Systemtap translator/driver (version 2.5/0.158, commit
release-2.4-185-g4a3f6fd34498 + changes)
Copyright (C) 2005-2014 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
enabled features: AVAHI LIBRPM LIBSQLITE3 NSS TR1_UNORDERED_MAP NLS JAVA
LIBVIRT LIBXML2

[root@gremlinka systemtap]# ~/bin/stap ~/reproducer.stp
Match: 0
Match: 0
Match: 0
Match: 0
Match: 0
Match: 0
Match: 0
Match: 0
Match: 0
Match: 0

Old version:
[root@gremlinka systemtap]# stap --version
Systemtap translator/driver (version 2.4/0.158, rpm 2.4-1.fc20)
Copyright (C) 2005-2013 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
enabled features: AVAHI LIBRPM LIBSQLITE3 NSS BOOST_SHARED_PTR
TR1_UNORDERED_MAP NLS DYNINST JAVA LIBVIRT LIBXML2

[root@gremlinka systemtap]# stap ~/reproducer.stp
Match: 1
We run /bin/bash
Match: 0
Match: 0
Match: 0
Match: 0
Match: 0
Match: 0
Match: 0
Match: 0
Match: 0

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