github.com/JimmyHuang454/JLS-go@v0.0.0-20230831150107-90d536585ba0/internal/fuzz/counters_unsupported.go (about)

     1  // Copyright 2021 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // TODO: expand the set of supported platforms, with testing. Nothing about
     6  // the instrumentation is OS specific, but only amd64 and arm64 are
     7  // supported in the runtime. See src/runtime/libfuzzer*.
     8  //
     9  // If you update this constraint, also update internal/platform.FuzzInstrumeted.
    10  //
    11  //go:build !((darwin || linux || windows || freebsd) && (amd64 || arm64))
    12  
    13  package fuzz
    14  
    15  // TODO(#48504): re-enable on platforms where instrumentation works.
    16  // In theory, we shouldn't need this file at all: if the binary was built
    17  // without coverage, then _counters and _ecounters should have the same address.
    18  // However, this caused an init failure on aix/ppc64, so it's disabled here.
    19  
    20  // coverage returns a []byte containing unique 8-bit counters for each edge of
    21  // the instrumented source code. This coverage data will only be generated if
    22  // `-d=libfuzzer` is set at build time. This can be used to understand the code
    23  // coverage of a test execution.
    24  func coverage() []byte { return nil }