Fix fuzzer-discovered timeout with deeply-nested structs.

The fuzzer found that `is_too_deeply_nested` would walk the entire
struct hierarchy, and crafted a massive tree of structs in order to
trigger a timeout. We now memoize the nesting depth of the most
deeply-nested field of each struct.

Change-Id: I1e6def90c46cb1951dc8ca46e1c6f53b8595a5a6
Bug: oss-fuzz:64293
Reviewed-by: Brian Osman <>
Auto-Submit: John Stiles <>
Commit-Queue: Brian Osman <>
2 files changed