Clear 'sHadError' in entry point.
The fuzzer invokes aidl_entry multiple times in a single run, and if one
of these runs through an error and one succeeds, we are unnecessarily
hitting this check.
We could make this problem go away by passing around a 'context' object
instead. This is something to consider if we run into this type of thing
again.
Fixes: 153709262
Test: fuzzer, see added corpus entry
Change-Id: I4eb96456e1e24790cc667b8e414c6c34e8814d87
diff --git a/aidl_language.h b/aidl_language.h
index 5f08504..16822b0 100644
--- a/aidl_language.h
+++ b/aidl_language.h
@@ -152,6 +152,7 @@
std::ostream& os_;
+ static void clearError() { sHadError = false; }
static bool hadError() { return sHadError; }
private: