Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid execve regex #16

Open
lacombar opened this issue Mar 9, 2015 · 1 comment
Open

Invalid execve regex #16

lacombar opened this issue Mar 9, 2015 · 1 comment

Comments

@lacombar
Copy link

lacombar commented Mar 9, 2015

The regex tracing the execve syscall fails to include a return value. As a result, failed system call will still considered valid, where they should not be and will both be included to the compilation database

For exemple:

[pid 30681] execve("/invalid/path/to/clang++", ["clang++", ..., "../src/compiler/js-builtin-reducer.cc"], [/* 58 vars */]) = -1 ENOENT (No such file or directory)
[pid 30681] execve("/valid/path/to/clang++", ["clang++", ..., "../src/compiler/js-builtin-reducer.cc"], [/* 58 vars */]) = 0
@lacombar
Copy link
Author

lacombar commented Mar 9, 2015

This seems to do the job...

diff --git a/clang-tags b/clang-tags
index 9820075..0eccf0f 100755
--- a/clang-tags
+++ b/clang-tags
@@ -135,7 +135,7 @@ def trace (args):
     cwd = os.getcwd()

     chdir_re = re.compile ("\[pid\s+\d+\] chdir\((.*)\) = 0")
-    exec_re  = re.compile ("\[pid\s+\d+\] execve(\(.*\)) = ")
+    exec_re  = re.compile ("\[pid\s+\d+\] execve(\(.*\)) = 0")

     for line in p.stderr:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant