Set SyscallEvent.ret to None if missing due to lttng bug
authorAntoine Busque <abusque@efficios.com>
Fri, 26 Feb 2016 22:58:15 +0000 (17:58 -0500)
committerAntoine Busque <abusque@efficios.com>
Fri, 26 Feb 2016 22:58:15 +0000 (17:58 -0500)
Signed-off-by: Antoine Busque <abusque@efficios.com>
lttnganalyses/linuxautomaton/sv.py

index c18d6ded4632f5815da36a1e3747b1073e251c21..75dd4a93a154744554cee7c3031bde9cf512b4f1 100644 (file)
@@ -72,12 +72,13 @@ class SyscallEvent():
 
     def process_exit(self, event):
         self.end_ts = event.timestamp
-        try:
-            self.ret = event['ret']
-        except:
-            print("[warning] syscall %s does not have a return code, that "
-                  "should not happen" % event.name)
-            self.ret = -1
+        # On certain architectures (notably arm32), lttng-modules
+        # versions prior to 2.8 would erroneously trace certain
+        # syscalls (e.g. mmap2) without their return value. In this
+        # case, get() will simply set self.ret to None. These syscalls
+        # with a None return value should simply be ignored down the
+        # line.
+        self.ret = event.get('ret')
         self.duration = self.end_ts - self.begin_ts
 
     @classmethod
This page took 0.028936 seconds and 5 git commands to generate.