Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ARM 32-bit panics #439

Merged
merged 1 commit into from
Jul 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion internal/httpauth/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ type HTTPError struct {
// Client implements Client for auth services.
// As Client needs to dial both with reusing address and without it, it uses two http clients: reuseClient and client.
type Client struct {
nonce uint64 // has to be handled with the atomic package at all time, needs to be 8 byte aligned
// atomic requires 64-bit alignment for struct field access
nonce uint64
mu sync.Mutex
client *http.Client
reuseClient *http.Client
Expand Down
5 changes: 3 additions & 2 deletions pkg/router/route_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,16 @@ func DefaultRouteGroupConfig() *RouteGroupConfig {
// RouteGroup should implement 'io.ReadWriteCloser'.
// It implements 'net.Conn'.
type RouteGroup struct {
// atomic requires 64-bit alignment for struct field access
lastSent int64

mu sync.Mutex

cfg *RouteGroupConfig
logger *logging.Logger
desc routing.RouteDescriptor // describes the route group
rt routing.Table

lastSent int64

// 'tps' is transports used for writing/forward rules.
// It should have the same number of elements as 'fwd'
// where each element corresponds with the adjacent element in 'fwd'.
Expand Down
1 change: 1 addition & 0 deletions pkg/transport/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
// LogEntry represents a logging entry for a given Transport.
// The entry is updated every time a packet is received or sent.
type LogEntry struct {
// atomic requires 64-bit alignment for struct field access
RecvBytes uint64 `json:"recv"` // Total received bytes.
SentBytes uint64 `json:"sent"` // Total sent bytes.
}
Expand Down