style: replace em and en dashes across sources
This commit is contained in:
+1
-1
@@ -38,7 +38,7 @@ func enterJITChecked(fn uintptr, stack uintptr)
|
||||
|
||||
// leaveJITCheckedRaw is the raw return trampoline for ABI checks. Its
|
||||
// address is obtained from the GLOBL in abi_amd64.s (leaveCheckedPtr),
|
||||
// which points to the .abi0 code — NOT the ABIInternal wrapper that this
|
||||
// which points to the .abi0 code, NOT the ABIInternal wrapper that this
|
||||
// declaration would generate. The declaration exists solely to satisfy
|
||||
// go vet's "missing Go declaration" check.
|
||||
//
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ func enterJITChecked(fn uintptr, stack uintptr)
|
||||
|
||||
// leaveJITCheckedRaw is the raw return trampoline for ABI checks. Its
|
||||
// address is obtained from the GLOBL in abi_arm64.s (leaveCheckedPtr),
|
||||
// which points to the .abi0 code — NOT the ABIInternal wrapper that this
|
||||
// which points to the .abi0 code, NOT the ABIInternal wrapper that this
|
||||
// declaration would generate. The declaration exists solely to satisfy
|
||||
// go vet's "missing Go declaration" check.
|
||||
//
|
||||
|
||||
@@ -22,7 +22,7 @@ func enterJITChecked(fn uintptr, stack uintptr)
|
||||
|
||||
// leaveJITCheckedRaw is the raw return trampoline for ABI checks. Its
|
||||
// address is obtained from the GLOBL in abi_loong64.s (leaveCheckedPtr),
|
||||
// which points to the .abi0 code — NOT the ABIInternal wrapper that this
|
||||
// which points to the .abi0 code, NOT the ABIInternal wrapper that this
|
||||
// declaration would generate. The declaration exists solely to satisfy
|
||||
// go vet's "missing Go declaration" check.
|
||||
//
|
||||
|
||||
@@ -22,7 +22,7 @@ func enterJITChecked(fn uintptr, stack uintptr)
|
||||
|
||||
// leaveJITCheckedRaw is the raw return trampoline for ABI checks. Its
|
||||
// address is obtained from the GLOBL in abi_riscv64.s (leaveCheckedPtr),
|
||||
// which points to the .abi0 code — NOT the ABIInternal wrapper that this
|
||||
// which points to the .abi0 code, NOT the ABIInternal wrapper that this
|
||||
// declaration would generate. The declaration exists solely to satisfy
|
||||
// go vet's "missing Go declaration" check.
|
||||
//
|
||||
|
||||
@@ -57,7 +57,7 @@ const stackPad = 64
|
||||
// (the ABI0 convention shares the argument area for inputs and outputs).
|
||||
//
|
||||
// The function must be NOSPLIT (no stack growth) and must not reference
|
||||
// external symbols — the image is self-contained.
|
||||
// external symbols, the image is self-contained.
|
||||
func Call(fnAddr uintptr, args []byte) ([]byte, error) {
|
||||
// Prepare the stack: [padding][leaveJIT addr][args...]
|
||||
stackSize := stackPad + 8 + len(args) + 64 // padding + ret + args + safety
|
||||
|
||||
+2
-2
@@ -33,7 +33,7 @@ func (r FuzzResult) String() string {
|
||||
if r.OK() {
|
||||
return fmt.Sprintf("%s: %d/%d iterations match", r.Func, r.Matches, r.Iterations)
|
||||
}
|
||||
s := fmt.Sprintf("%s: %d/%d match, %d MISMATCH — %s",
|
||||
s := fmt.Sprintf("%s: %d/%d match, %d MISMATCH: %s",
|
||||
r.Func, r.Matches, r.Iterations, r.Mismatches, r.FirstFail)
|
||||
if len(r.CrashInput) > 0 {
|
||||
s += fmt.Sprintf("\n input: %x", r.CrashInput)
|
||||
@@ -295,7 +295,7 @@ func genDualArgs(rng *rand.Rand, sig funcSig, argSize int) (gasmArgs, goArgs []b
|
||||
bufs = append(bufs, buf1, buf2)
|
||||
putPtr(gasmArgs, off, unsafe.Pointer(&buf1[0]))
|
||||
putPtr(goArgs, off, unsafe.Pointer(&buf2[0]))
|
||||
// len and cap both equal declaredLen — the buffer is guaranteed
|
||||
// len and cap both equal declaredLen, the buffer is guaranteed
|
||||
// to hold at least declaredLen elements plus safety margin.
|
||||
putU64(gasmArgs, off+8, uint64(declaredLen))
|
||||
putU64(gasmArgs, off+16, uint64(declaredLen))
|
||||
|
||||
@@ -19,7 +19,7 @@ func TestFuzzResultString(t *testing.T) {
|
||||
t.Run("mismatch", func(t *testing.T) {
|
||||
r := FuzzResult{Func: "mul", Iterations: 100, Matches: 95, Mismatches: 5, FirstFail: "iter 23"}
|
||||
s := r.String()
|
||||
if s != "mul: 95/100 match, 5 MISMATCH — iter 23" {
|
||||
if s != "mul: 95/100 match, 5 MISMATCH: iter 23" {
|
||||
t.Errorf("String() = %q", s)
|
||||
}
|
||||
})
|
||||
@@ -27,7 +27,7 @@ func TestFuzzResultString(t *testing.T) {
|
||||
t.Run("crash", func(t *testing.T) {
|
||||
r := FuzzResult{Func: "dec", Iterations: 100, Matches: 99, Mismatches: 1, FirstFail: "SIGSEGV", CrashInput: []byte{0x01, 0x02}}
|
||||
s := r.String()
|
||||
if s != "dec: 99/100 match, 1 MISMATCH — SIGSEGV\n input: 0102" {
|
||||
if s != "dec: 99/100 match, 1 MISMATCH: SIGSEGV\n input: 0102" {
|
||||
t.Errorf("String() = %q", s)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user