diff options
| author | 2021-05-14 19:16:39 +0000 | |
|---|---|---|
| committer | 2021-05-14 20:51:54 +0000 | |
| commit | 06e367beaa56d75c103bbb38d19d9b97713b6881 (patch) | |
| tree | 7466fb48491e26f0a65f2613ae89601aa7e52621 /vulkan/libvulkan/api.cpp | |
| parent | d2e8a8eaac34db57e14b9b8089d2aab48dd7f7df (diff) | |
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
Diffstat (limited to 'vulkan/libvulkan/api.cpp')
0 files changed, 0 insertions, 0 deletions