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: segfault on arm due to unaligned atomics #31

Merged
merged 1 commit into from Dec 4, 2020

Commits on Dec 4, 2020

  1. fix: segfault on arm due to unaligned atomics

    This fixes the following segfault:
    
    runtime/internal/atomic.goStore64(0x2487864, 0x5fc9a110, 0x0)
            /home/konrad/opt/go/src/runtime/internal/atomic/atomic_arm.go:144 +0x1c
    github.com/DrmagicE/gmqtt.(*client).setDisconnectedAt(0x2487800, 0x184d7eef, 0xbfea8
    
    The atomics must be 64bit aligned on 32bit architectures because
    otherwise an attempt to store results in segfault.
    
    See: https://golang.org/pkg/sync/atomic/#pkg-note-BUG
    bergotorino committed Dec 4, 2020
    Configuration menu
    Copy the full SHA
    d7794b5 View commit details
    Browse the repository at this point in the history