-
Notifications
You must be signed in to change notification settings - Fork 63
Closed
Description
While testing my own code for data races I discovered a data race warning with writes to the endian variable in every call to some of the package methods.
To reproduce
func main() {
for i := 0; i <= 10; i++ {
go ibmmq.NewMQCFH()
}
time.Sleep(1 * time.Second)
}
$ go run -race ibmmq_race.go
==================
WARNING: DATA RACE
Write at 0x00000089ead0 by goroutine 7:
github.com/ibm-messaging/mq-golang/ibmmq.NewMQCFH()
/go/src/github.com/ibm-messaging/mq-golang/ibmmq/mqiPCF.go:85 +0x134
Previous write at 0x00000089ead0 by goroutine 8:
github.com/ibm-messaging/mq-golang/ibmmq.NewMQCFH()
/go/src/github.com/ibm-messaging/mq-golang/ibmmq/mqiPCF.go:85 +0x134
Perhaps endian can be set as a constant in respective cmqc_ file instead?
Metadata
Metadata
Assignees
Labels
No labels