diff options
| author | Ian Lance Taylor <iant@golang.org> | 2015-12-02 12:07:57 -0800 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2015-12-02 21:02:28 +0000 |
| commit | 5a049aa4a6c7e73163375ee00acf413ff4a0a0c4 (patch) | |
| tree | 6f3e311185adfc86723b418f235a1bc69f3bd56b /misc/cgo/errors | |
| parent | 8a34cf7ee09596235efa6d01e8f6114c585a3c97 (diff) | |
| download | go-5a049aa4a6c7e73163375ee00acf413ff4a0a0c4.tar.xz | |
cmd/cgo: error, not panic, if not enough arguments to function
Fixes #13423.
Change-Id: I41bb45790cca36c57a107796f0eca61287acb2a9
Reviewed-on: https://go-review.googlesource.com/17332
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'misc/cgo/errors')
| -rw-r--r-- | misc/cgo/errors/issue13423.go | 12 | ||||
| -rwxr-xr-x | misc/cgo/errors/test.bash | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/misc/cgo/errors/issue13423.go b/misc/cgo/errors/issue13423.go new file mode 100644 index 0000000000..6b2ad58a9d --- /dev/null +++ b/misc/cgo/errors/issue13423.go @@ -0,0 +1,12 @@ +// Copyright 2015 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. + +package main + +// #include <stdio.h> +import "C" + +func main() { + _ = C.fopen() // ERROR HERE +} diff --git a/misc/cgo/errors/test.bash b/misc/cgo/errors/test.bash index d15c9e113d..1744eee077 100755 --- a/misc/cgo/errors/test.bash +++ b/misc/cgo/errors/test.bash @@ -40,6 +40,7 @@ check issue8442.go check issue11097a.go check issue11097b.go expect issue13129.go C.ushort +check issue13423.go if ! go run ptr.go; then exit 1 |
