Mukund,

If you suspect a bug in the compiler or the standard library, compile annd 
run the program using the latest version or, even better, tip so that you 
include all known bug fixes.

I couldn't reproduce your error at Go tip:

$ go version
go version devel +bebfd4b Tue Apr 4 06:26:11 2017 +0000 linux/amd64
$ go run mukund.go
$ go run -race mukund.go
$ 

Using the line number, math/rand/rng.go:243, I backtracked to your likely 
version. I couldn't reproduce your error at go1.7:

$ go version
go version go1.7.5 linux/amd64
$ go run mukund.go
$ go run -race mukund.go
$ 

I couldn't reproduce your error going as far back as go1.4:

$ go version
go version go1.4-bootstrap-20161024 linux/amd64
$ go run mukund.go
$ go run -race mukund.go
$ 

mukund.go: https://play.golang.org/p/SGkJyxYPiR

To help you further, we need you to provide us with a small program which 
we can use to reproduce your error. Also, provide us with the output from 
the go version and go env commands.

Peter

On Tuesday, April 4, 2017 at 4:37:59 AM UTC-4, Mukund 8kmiles wrote:
>
> Hi,
>
> It is a basic index out of range but inside *math.Rand() *and not in 
> objects that I create. Could that be a bug ? I have given my source, below. 
> Any help or pointers is appreciated
>
> panic: runtime error: index out of range
>
> goroutine 32 [running]:
> panic(0x7d5780, 0xc420010140)
> /opt/go/src/runtime/panic.go:500 +0x1a1
> math/rand.(*rngSource).Int63(0xc420024a00, 0x694976b867c8d8d7)
> /opt/go/src/math/rand/rng.go:243 +0x85
> math/rand.(*Rand).Int63(0xc4200ccac0, 0x694976b867c8d8d7)
> /opt/go/src/math/rand/rand.go:64 +0x33
> math/rand.(*Rand).Int31(0xc4200ccac0, 0x7ffe694976b8)
> /opt/go/src/math/rand/rand.go:70 +0x2b
> math/rand.(*Rand).Int31n(0xc4200ccac0, 0x64, 0x0)
> /opt/go/src/math/rand/rand.go:105 +0x5c
> math/rand.(*Rand).Intn(0xc4200ccac0, 0x64, 0x0)
> /opt/go/src/math/rand/rand.go:119 +0x45
> *flowlogs.pickENI(0xc4200110c0, 0xc)*
> /home/mukund/go/src/flowlogs/vpcflowlogs.go:351 +0x39
> flowlogs.GenerateVPCLogData(0xa, 0x0, 0x0, 0x0)
> /home/mukund/go/src/flowlogs/vpcflowlogs.go:126 +0x15d
> main.ingestRecords(0xc420210000, 0xc420394480, 0xc420394495, 0x1, 
> 0x7ffee087b128, 0x3, 0xa, 0xa)
> /home/mukund/go/src/flmain/kinesisproducer.go:288 +0xd4
> created by main.main
> /home/mukund/go/src/flmain/kinesisproducer.go:108 +0x6ef
> exit status 2
>
> *****************************************************************
>
> source:
> https://play.golang.org/p/SGkJyxYPiR
>
> *****************************************************************
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to