We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following Unaligned panic occurs on a 32 bit ARM processor
runtime/internal/atomic.panicUnaligned() /usr/lib/go/src/runtime/internal/atomic/unaligned.go:8 +0x24 runtime/internal/atomic.Load64(0xf482b4) /usr/lib/go/src/runtime/internal/atomic/atomic_arm.s:286 +0x14 github.com/qmuntal/stateless.(*StateMachine).Firing(...) /home/andy/Documents/werk/software/products/xte/xte_dev/vendor/github.com/qmuntal/stateless/statemachine.go:268
A simple workaround is to re-arrange the StateMachine struct to place the 'ops' field first where it has the correct byte alignment.
type StateMachine struct { ops uint64 stateConfig map[State]*stateRepresentation triggerConfig map[Trigger]triggerWithParameters stateAccessor func(context.Context) (State, error) stateMutator func(context.Context, State) error unhandledTriggerAction UnhandledTriggerActionFunc onTransitioningEvents onTransitionEvents onTransitionedEvents onTransitionEvents eventQueue *list.List firingMode FiringMode firingMutex sync.Mutex }
The text was updated successfully, but these errors were encountered:
This is unfortunate. Related to golang/go#23345.
The workaround is to move ops to the beginning of the struct, as @james7272 recommended.
ops
I'll cut a new release with this fixed soon.
Sorry, something went wrong.
Thanks for the prompt fix, much appreciated.
Successfully merging a pull request may close this issue.
The following Unaligned panic occurs on a 32 bit ARM processor
A simple workaround is to re-arrange the StateMachine struct to place the 'ops' field first where it has the correct byte alignment.
The text was updated successfully, but these errors were encountered: