mirror of
https://github.com/golang/go.git
synced 2025-05-05 23:53:05 +00:00
Change-Id: Iae6ac32db5c2aacb323793a7e0dc34e09648d035 Reviewed-on: https://go-review.googlesource.com/c/go/+/482295 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Auto-Submit: Ian Lance Taylor <iant@golang.org>
29 lines
486 B
Go
29 lines
486 B
Go
// Copyright 2017 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
//go:build ignore
|
|
|
|
package main
|
|
|
|
import (
|
|
"log"
|
|
"plugin"
|
|
)
|
|
|
|
func main() {
|
|
p, err := plugin.Open("issue.22295.so")
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
f, err := p.Lookup("F")
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
const want = 2503
|
|
got := f.(func() int)()
|
|
if got != want {
|
|
log.Fatalf("got %d, want %d", got, want)
|
|
}
|
|
}
|