binder_parcel_fuzzer: remove rlimit
Originally I was going for a model where too big of allocations are
actually sent to malloc and they fail, but this wasn't really a good
plan:
- allocations which are near the maximum can cause arbitrary threads
to fail even if they allocate just one byte
- Android doesn't use C++ exceptions and the libbinder API freezes
its use of std::vector. I was looking at forking libc++ to fix
that, but it's overkill
- rlimit doesn't play well with crash_dump* in Android or with the
fuzzing infrastructure (prevents crash stack from happening)
Instead, going with this model of only making "reasonable" allocations
to begin with (reject too-big allocations without letting them fail).
This is probably not the "best way" to do things or the best way to
design a programming language environment (C++), but it works!
Bug: 131868573
Test: binder_parcel_fuzzer for a few minutes
Change-Id: Ie487b34e3277edecbf4d913dc1a42a3e82b5cd42
1 file changed