Skip to content

Commit

Permalink
Merge pull request #150 from makern/64bit-align
Browse files Browse the repository at this point in the history
Fix alignment crash on i386
  • Loading branch information
buger committed Mar 23, 2015
2 parents 92ba321 + b2e1eea commit a059648
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion output_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,17 @@ func ParseRequest(data []byte) (request *http.Request, err error) {
const InitialDynamicWorkers = 10

type HTTPOutput struct {
// Keep this as first element of struct because it guarantees 64bit
// alignment. atomic.* functions crash on 32bit machines if operand is not
// aligned at 64bit. See https://github.com/golang/go/issues/599
activeWorkers int64

address string
limit int
queue chan []byte

redirectLimit int

activeWorkers int64
needWorker chan int

urlRegexp HTTPUrlRegexp
Expand Down

0 comments on commit a059648

Please sign in to comment.