| This directory contains a simple core file for use in testing. | |
| It was generated by running the following program with go1.9.0. | |
| package main | |
| func main() { | |
| _ = *(*int)(nil) | |
| } | |
| The core file includes the executable by reference using an absolute | |
| path. The executable was at /tmp/test, so that path is reproduced | |
| here so the core dump reader can find the executable using this | |
| testdata directory as the base directory. | |
| core1.10 is produced in the same way, except using go1.10.0. | |
| core1.11 is produced in the same way, except using go1.11.0. | |
| steps for subsequent versions: | |
| mkdir /tmp/coretest | |
| cd /tmp/coretest | |
| rm -fr * // in case there's old junk there | |
| cat the above program into test.go | |
| go build test.go | |
| ulimit -c unlimited | |
| GOTRACEBACK=crash ./test | |
| zip 1.12.zip /tmp/coretest/core /tmp/coretest/test // use your version number | |
| Then move the 1.12.zip to this directory. | |
| Add a new test to TestVersions in ../gocore_test.go. | |
| ## runtimetype | |
| This directory also contains the source code to generate the runtimetype core, | |
| which is used to test getting runtime type for a interface. | |
| steps for generate runtimetype core: | |
| cd testdata/runtimetype | |
| go build -o runtimetype . | |
| ulimit -c unlimited | |
| GOTRACEBACK=crash ./runtimetype | |
| zip runtimetype.zip runtimetype core |