clang-tags
clang-tags copied to clipboard
Invalid execve regex
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
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: