Clear Context in EventLoop at construction time
We were exposing uninitialized memory and hoping our users wouldn't try
to access it. This is an overly bold assumption.
Change-Id: I286fe5e932354581419059d128563c435b16071b
Signed-off-by: Austin Schuh <austin.schuh@bluerivertech.com>
diff --git a/aos/events/event_loop.h b/aos/events/event_loop.h
index 27f0c76..ff1183f 100644
--- a/aos/events/event_loop.h
+++ b/aos/events/event_loop.h
@@ -856,6 +856,8 @@
// Sets context_ for a timed event which is supposed to happen at the provided
// time.
void SetTimerContext(monotonic_clock::time_point monotonic_event_time);
+ // Clears context_ so it only has invalid times and elements in it.
+ void ClearContext();
private:
virtual pid_t GetTid() = 0;