- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 165 for asan (0.23 sec)
-
src/cmd/cgo/internal/testsanitizers/testdata/arena_fail.go
x := arena.New[[200]byte](a) x[0] = 9 a.Free() // Use after free. // // ASAN should detect this deterministically as Free // should poison the arena memory. // // MSAN should detect that this access is to freed // memory. This may crash with an "accessed freed arena // memory" error before MSAN gets a chance, but if MSAN // was not enabled there would be a chance that this // could fail to crash on its own.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 700 bytes - Viewed (0) -
src/runtime/asan_amd64.s
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build asan #include "go_asm.h" #include "go_tls.h" #include "funcdata.h" #include "textflag.h" // This is like race_amd64.s, but for the asan calls. // See race_amd64.s for detailed comments. #ifdef GOOS_windows #define RARG0 CX #define RARG1 DX #define RARG2 R8 #define RARG3 R9
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 22 02:20:04 UTC 2023 - 2.4K bytes - Viewed (0) -
src/cmd/cgo/internal/testsanitizers/testdata/asan3_fail.go
package main /* #include <stdlib.h> #include <stdio.h> void test(int *a) { // Access Go pointer out of bounds. int c = a[5]; // BOOM // We shouldn't get here; asan should stop us first. printf("a[5]=%d\n", c); } */ import "C" func main() { cIntSlice := []C.int{200, 201, 203, 203, 204} C.test(&cIntSlice[0])
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 486 bytes - Viewed (0) -
src/cmd/cgo/internal/testsanitizers/testdata/asan_unsafe_fail2.go
import ( "fmt" "unsafe" ) func main() { a := 1 b := 2 c := add(a, b) d := a + b fmt.Println(c, d) } //go:noinline func add(a1, b1 int) (ret int) { // The return value // When -asan is enabled, the unsafe.Pointer(&ret) conversion is escaping. var p *int = (*int)(unsafe.Add(unsafe.Pointer(&ret), 1*unsafe.Sizeof(int(1)))) *p = 123 // BOOM ret = a1 + b1 return
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 550 bytes - Viewed (0) -
src/cmd/cgo/internal/testsanitizers/testdata/asan4_fail.go
package main /* #include <stdlib.h> #include <stdio.h> void test(int* a) { // Access Go pointer out of bounds. a[3] = 300; // BOOM // We shouldn't get here; asan should stop us first. printf("a[3]=%d\n", a[3]); }*/ import "C" func main() { var cIntArray [2]C.int C.test(&cIntArray[0]) // cIntArray is moved to heap.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 496 bytes - Viewed (0) -
src/cmd/cgo/internal/testsanitizers/testdata/asan2_fail.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 616 bytes - Viewed (0) -
src/cmd/cgo/internal/testsanitizers/testdata/asan_unsafe_fail3.go
// license that can be found in the LICENSE file. package main import ( "fmt" "unsafe" ) func main() { a := 1 b := 2 // The local variables. // When -asan is enabled, the unsafe.Pointer(&a) conversion is escaping. var p *int = (*int)(unsafe.Add(unsafe.Pointer(&a), 1*unsafe.Sizeof(int(1)))) *p = 20 // BOOM d := a + b fmt.Println(d)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 457 bytes - Viewed (0) -
src/cmd/cgo/internal/testsanitizers/testdata/asan1_fail.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 500 bytes - Viewed (0) -
src/cmd/cgo/internal/testsanitizers/testdata/asan_unsafe_fail1.go
import ( "fmt" "unsafe" ) func main() { a := 1 b := 2 c := add(a, b) d := a + b fmt.Println(c, d) } //go:noinline func add(a1, b1 int) int { // The arguments. // When -asan is enabled, unsafe.Pointer(&a1) conversion is escaping. var p *int = (*int)(unsafe.Add(unsafe.Pointer(&a1), 1*unsafe.Sizeof(int(1)))) *p = 10 // BOOM return a1 + b1
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 528 bytes - Viewed (0) -
src/cmd/cgo/internal/testsanitizers/cc_test.go
case "memory": c.goFlags = append(c.goFlags, "-msan") case "thread": c.goFlags = append(c.goFlags, "--installsuffix=tsan") compiler, _ := compilerVersion() if compiler.name == "gcc" { c.cFlags = append(c.cFlags, "-fPIC") c.ldFlags = append(c.ldFlags, "-fPIC", "-static-libtsan") } case "address": c.goFlags = append(c.goFlags, "-asan") // Set the debug mode to print the C stack trace.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 09 20:00:56 UTC 2024 - 14.4K bytes - Viewed (0)