Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 121 for Stop (0.1 sec)

  1. 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)
  2. src/cmd/cgo/internal/testsanitizers/testdata/asan2_fail.go

    import (
    	"fmt"
    	"unsafe"
    )
    
    func main() {
    	a := C.f()
    	q5 := (*C.int)(unsafe.Add(unsafe.Pointer(a), 4*5))
    	// Access to C pointer out of bounds.
    	*q5 = 100 // BOOM
    	// We shouldn't get here; asan should stop us first.
    	fmt.Printf("q5: %d, %x\n", *q5, q5)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 616 bytes
    - Viewed (0)
  3. 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)
  4. src/cmd/cgo/internal/testsanitizers/testdata/msan_fail.go

      int32_t * volatile q = (int32_t *)malloc(sizeof(int32_t) * n);
      memcpy(p, q, n * sizeof(*p));
      free(q);
    }
    
    void g(int32_t *p, int n) {
      if (p[4] != 1) {
        // We shouldn't get here; msan should stop us first.
        exit(0);
      }
    }
    */
    import "C"
    
    import (
    	"unsafe"
    )
    
    func main() {
    	a := make([]int32, 10)
    	C.f((*C.int32_t)(unsafe.Pointer(&a[0])), C.int(len(a)))
    	a[3] = 1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 701 bytes
    - Viewed (0)
  5. src/cmd/go/internal/lockedfile/lockedfile_test.go

    	go func() {
    		f()
    		close(done)
    	}()
    
    	timer := time.NewTimer(quiescent)
    	defer timer.Stop()
    	select {
    	case <-done:
    		t.Fatalf("%s unexpectedly did not block", desc)
    	case <-timer.C:
    	}
    
    	return func(t *testing.T) {
    		logTimer := time.NewTimer(quiescent)
    		defer logTimer.Stop()
    
    		select {
    		case <-logTimer.C:
    			// We expect the operation to have unblocked by now,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 05 23:35:29 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  6. src/cmd/go/internal/vet/vet.go

    		var err error
    		ctx, close, err = trace.Start(ctx, cfg.DebugTrace)
    		if err != nil {
    			base.Fatalf("failed to start trace: %v", err)
    		}
    		defer func() {
    			if err := close(); err != nil {
    				base.Fatalf("failed to stop trace: %v", err)
    			}
    		}()
    	}
    
    	ctx, span := trace.StartSpan(ctx, fmt.Sprint("Running ", cmd.Name(), " command"))
    	defer span.Done()
    
    	work.BuildInit()
    	work.VetFlags = vetFlags
    	if len(vetFlags) > 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 06 19:23:42 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  7. src/cmd/go/internal/tool/tool.go

    	if err == nil {
    		c := make(chan os.Signal, 100)
    		signal.Notify(c)
    		go func() {
    			for sig := range c {
    				toolCmd.Process.Signal(sig)
    			}
    		}()
    		err = toolCmd.Wait()
    		signal.Stop(c)
    		close(c)
    	}
    	if err != nil {
    		// Only print about the exit status if the command
    		// didn't even run (not an ExitError) or it didn't exit cleanly
    		// or we're printing command lines too (-x mode).
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 05 18:02:11 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  8. src/cmd/cgo/internal/testsanitizers/testdata/tsan10.go

    	"syscall"
    )
    
    /*
    #cgo CFLAGS: -g -fsanitize=thread
    #cgo LDFLAGS: -g -fsanitize=thread
    */
    import "C"
    
    func main() {
    	c := make(chan os.Signal, 1)
    	signal.Notify(c, syscall.SIGUSR1)
    	defer signal.Stop(c)
    	syscall.Kill(syscall.Getpid(), syscall.SIGUSR1)
    	<-c
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 798 bytes
    - Viewed (0)
  9. src/cmd/cgo/internal/testcarchive/carchive_test.go

    	if err := cmd.Start(); err != nil {
    		t.Fatal(err)
    	}
    
    	timer := time.AfterFunc(time.Minute,
    		func() {
    			t.Error("test program timed out")
    			cmd.Process.Kill()
    		},
    	)
    	defer timer.Stop()
    
    	err = cmd.Wait()
    	t.Logf("%v\n%s", cmd.Args, sb)
    	if err != nil {
    		t.Error(err)
    	}
    }
    
    // Issue 49288.
    func TestPreemption(t *testing.T) {
    	if runtime.Compiler == "gccgo" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 00:43:51 UTC 2023
    - 34.8K bytes
    - Viewed (0)
  10. src/cmd/go/internal/modload/search.go

    						fmt.Fprintf(os.Stderr, "warning: ignoring symlink %s\n", pkgDir)
    					}
    				}
    				return nil
    			}
    
    			if !want {
    				return filepath.SkipDir
    			}
    			// Stop at module boundaries.
    			if (prune&pruneGoMod != 0) && pkgDir != root {
    				if fi, err := os.Stat(filepath.Join(pkgDir, "go.mod")); err == nil && !fi.IsDir() {
    					return filepath.SkipDir
    				}
    			}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 08 17:55:15 UTC 2023
    - 7.9K bytes
    - Viewed (0)
Back to top