go-overflow-sample/README.md

19 lines
507 B
Markdown
Raw Permalink Normal View History

```
$ go build
$ ./go-overflow-sample 999999999999999999
1492596583345867513
$ ./go-overflow-sample 9999999999999999999
Could not convert argument to int64
panic: crypto/rand: argument to Int is <= 0
goroutine 1 [running]:
crypto/rand.Int({0x4d0b88?, 0xc000014060?}, 0x0?)
/usr/lib64/go/1.22/src/crypto/rand/util.go:64 +0x2ca
main.RandInt(0x4d0b08?)
/home/georg/Work/git/go-overflow-sample/main.go:23 +0x86
main.main()
/home/georg/Work/git/go-overflow-sample/main.go:18 +0xdc
```