- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for chooseLen (0.09 sec)
-
src/internal/fuzz/mutators_byteslice.go
return nil } pos0 := m.rand(len(b)) pos1 := pos0 + m.chooseLen(len(b)-pos0) copy(b[pos0:], b[pos1:]) b = b[:len(b)-(pos1-pos0)] return b } // byteSliceInsertRandomBytes inserts a chunk of random bytes into b at a random // position. func byteSliceInsertRandomBytes(m *mutator, b []byte) []byte { pos := m.rand(len(b) + 1) n := m.chooseLen(1024) if len(b)+n >= cap(b) { return nil } b = b[:len(b)+n]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 19 18:23:43 UTC 2021 - 7.7K bytes - Viewed (0) -
src/internal/fuzz/mutator.go
} func (m *mutator) randByteOrder() binary.ByteOrder { if m.r.bool() { return binary.LittleEndian } return binary.BigEndian } // chooseLen chooses length of range mutation in range [1,n]. It gives // preference to shorter ranges. func (m *mutator) chooseLen(n int) int { switch x := m.rand(100); { case x < 90: return m.rand(min(8, n)) + 1 case x < 99: return m.rand(min(32, n)) + 1 default:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 18 20:01:34 UTC 2023 - 6.6K bytes - Viewed (0) -
configure.py
write_action_env_to_bazelrc('PYTHON_LIB_PATH', python_lib_path) write_to_bazelrc('build --python_path=\"{}"'.format(python_bin_path)) environ_cp['PYTHON_BIN_PATH'] = python_bin_path # If choosen python_lib_path is from a path specified in the PYTHONPATH # variable, need to tell bazel to include PYTHONPATH if environ_cp.get('PYTHONPATH'): python_paths = environ_cp.get('PYTHONPATH').split(':')
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Jun 10 04:32:44 UTC 2024 - 53.8K bytes - Viewed (0)