Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for TestZeroArgCallback (0.3 sec)

  1. src/cmd/cgo/internal/test/cgo_test.go

    func TestSetEnv(t *testing.T)                { testSetEnv(t) }
    func TestThreadLock(t *testing.T)            { testThreadLockFunc(t) }
    func TestUnsignedInt(t *testing.T)           { testUnsignedInt(t) }
    func TestZeroArgCallback(t *testing.T)       { testZeroArgCallback(t) }
    
    func BenchmarkCgoCall(b *testing.B)      { benchCgoCall(b) }
    func BenchmarkGoString(b *testing.B)     { benchGoString(b) }
    func BenchmarkCGoCallback(b *testing.B)  { benchCallback(b) }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 17 21:53:11 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/test/callback.go

    	nestedCall(func() { panic("callback panic") })
    	panic("nestedCall returned")
    }
    
    // Callback with zero arguments used to make the stack misaligned,
    // which broke the garbage collector and other things.
    func testZeroArgCallback(t *testing.T) {
    	defer func() {
    		s := recover()
    		if s != nil {
    			t.Fatal("panic during callback:", s)
    		}
    	}()
    	C.callGoFoo()
    }
    
    //export goFoo
    func goFoo() {
    	x := 1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:02 UTC 2023
    - 111.5K bytes
    - Viewed (0)
Back to top