Skip to content

Commit 8ef956a

Browse files
installd_service_fuzzer: Add signal() to handle SIGPIPE
Adding signal handler to avoid abort() due to broken pipe. Test: ./installd_service_fuzzer Bug: 376201407 Change-Id: I4ae951c3cb900ffa7727d54b6083951aa69fc677
1 parent bd28005 commit 8ef956a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

cmds/installd/tests/fuzzers/InstalldServiceFuzzer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ bool force_compile_without_image() {
4747
} // namespace android
4848

4949
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
50+
// TODO(b/183141167): need to rewrite 'dump' to avoid SIGPIPE.
51+
signal(SIGPIPE, SIG_IGN);
5052
auto service = sp<InstalldNativeService>::make();
5153
fuzzService(service, FuzzedDataProvider(data, size));
5254
return 0;

0 commit comments

Comments
 (0)