Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 80 for stopFn (0.48 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/compile/internal/syntax/testdata/chans.go

    // Next method to retrieve values. The Sender provides a Send method
    // to send values and a Close method to stop sending values. The Next
    // method indicates when the Sender has been closed, and the Send
    // method indicates when the Receiver has been freed.
    //
    // This is a convenient way to exit a goroutine sending values when
    // the receiver stops reading them.
    func Ranger[T any]() (*Sender[T], *Receiver[T]) {
    	c := make(chan T)
    	d := make(chan bool)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 30 18:02:18 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. src/cmd/compile/internal/types2/api.go

    	// Secondary errors (for instance, to enumerate all types
    	// involved in an invalid recursive type declaration) have
    	// error strings that start with a '\t' character.
    	// If Error == nil, type-checking stops with the first
    	// error found.
    	Error func(err error)
    
    	// An importer is used to import packages referred to from
    	// import declarations.
    	// If the installed importer implements ImporterFrom, the type
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 13:48:53 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  7. src/cmd/asm/internal/asm/parse.go

    			return "", "", nil, false
    		}
    		break
    	}
    	// First item must be an identifier.
    	if tok != scanner.Ident {
    		p.errorf("expected identifier, found %q", p.lex.Text())
    		return "", "", nil, false // Might as well stop now.
    	}
    	word, cond = p.lex.Text(), ""
    	operands = scratch[:0]
    	// Zero or more comma-separated operands, one per loop.
    	nesting := 0
    	colon := -1
    	for tok != '\n' && tok != ';' {
    		// Process one operand.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 14:34:57 UTC 2024
    - 36.9K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/ssagen/ssa.go

    		p := s.newValue1I(ssa.OpOffPtr, types.NewPtr(t), o, addr)
    		s.store(t, p, v)
    	}
    }
    
    // zeroResults zeros the return values at the start of the function.
    // We need to do this very early in the function.  Defer might stop a
    // panic and show the return values as they exist at the time of
    // panic.  For precise stacks, the garbage collector assumes results
    // are always live, so we need to zero them before any allocations,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 19:44:43 UTC 2024
    - 284.9K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top