Fix: on-event condition: don't abort() on invalid event expression type
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 26 Mar 2021 22:39:30 +0000 (18:39 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 26 Mar 2021 22:53:04 +0000 (18:53 -0400)
Protocol errors should not result in crashes. Simply report the
failure to deserialize the event expression.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ic5a0be6b248c430fcf1fe487cd734d9bdf5dd36a

src/common/conditions/on-event.c

index 31d6d756b0fb556d02270d6075d4a6aaa41f03f7..fa37a3540172611c491342722b60f1ae214de041 100644 (file)
@@ -743,7 +743,9 @@ struct lttng_event_expr *event_expr_from_payload(
                break;
        }
        default:
-               abort();
+               ERR("Invalid event expression type encoutered while deserializing event expression: type = %" PRIu64,
+                               type);
+               goto error;
        }
 
        goto end;
This page took 0.033947 seconds and 4 git commands to generate.