Skip to content

Commit

Permalink
Disable fuzzer_tool_flac for i386 (#749)
Browse files Browse the repository at this point in the history
Revert commits ce91056 and 33b9a4a, disable tool_flac fuzzer for
i386 ASAN because weird bugs keep popping up
  • Loading branch information
ktmf01 authored Oct 5, 2024
1 parent 50efa0c commit 86d6de6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
6 changes: 5 additions & 1 deletion oss-fuzz/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ EXTRA_DIST = \
noinst_PROGRAMS =

if USE_OSSFUZZERS
noinst_PROGRAMS += fuzzer_encoder fuzzer_encoder_v2 fuzzer_decoder fuzzer_seek fuzzer_metadata fuzzer_reencoder fuzzer_tool_flac fuzzer_tool_metaflac
noinst_PROGRAMS += fuzzer_encoder fuzzer_encoder_v2 fuzzer_decoder fuzzer_seek fuzzer_metadata fuzzer_reencoder fuzzer_tool_metaflac
if FLaC__CPU_IA32
else
noinst_PROGRAMS += fuzzer_tool_flac
endif
endif

fuzzer_encoder_SOURCES = encoder.cc
Expand Down
13 changes: 0 additions & 13 deletions src/flac/encode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1635,12 +1635,6 @@ static void static_metadata_clear(static_metadata_t *m)
static FLAC__bool static_metadata_append(static_metadata_t *m, FLAC__StreamMetadata *d, FLAC__bool needs_delete)
{
void *x;
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
#ifdef __i386__
/* Work around i386 ASAN bug */
if(0 == d) return true;
#endif
#endif
if(0 == (x = safe_realloc_nofree_muladd2_(m->metadata, sizeof(*m->metadata), /*times (*/m->num_metadata, /*+*/1/*)*/)))
return false;
m->metadata = (FLAC__StreamMetadata**)x;
Expand Down Expand Up @@ -2920,13 +2914,6 @@ FLAC__bool fskip_ahead(FILE *f, FLAC__uint64 offset)
static uint8_t dump[8192];
struct flac_stat_s stb;

#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
#ifdef __i386__
/* Work around i386 ASAN bug */
if(offset > (FLAC__uint64)(INT32_MAX)) return false;
#endif
#endif

if(flac_fstat(fileno(f), &stb) == 0 && (stb.st_mode & S_IFMT) == S_IFREG)
{
if(fseeko(f, offset, SEEK_CUR) == 0)
Expand Down

0 comments on commit 86d6de6

Please sign in to comment.