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
pkg: cncbor: misc fixes #8791
pkg: cncbor: misc fixes #8791
Conversation
@lorenz9314 can you take a look at this? |
Did you consider also submitting these patches upstream? |
The original code has a comment like "if you cannot do unaligned accesses, fix these:", so I assumed upstream is not interested. Then again, as is, noone ever used that code on ARM before... |
I see that upstream code comment as more of a "feel free to provide a PR if you need alignment", not a wontfix |
|
@kaspar030 Yep, sure. I pretty much took the parse_hex() function from the original cn-cbor tests. This however seems much more elegant (and functioning) anyway. |
Got the same problem while testing cbor related things. Should we wait for upstream merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested ACK. However maybe it's good to wait for upstream changes.
AND, we didn't spot this because Murdock doesn't build unittests separately, and while building the whole unittests the module I think we should provide a fix for that. I think @kaspar030 was working already on something like that while doing #8801 ? |
I suggest we merge this, upstreaming might take time. We can remove the patch easily later. Also, this PR includes some other fixes to the package. |
|
Then go! |
Contribution description
Testing in #8467 was limited to native. This PR fixes some problems on ARM:
cn-cbor uses unaligned ntoh[sl](), causing hard faults on ARM. -> added an alignment safe implementation
the unittests parse_hex() had faulty malloc+sscanf. replaced with fmt.
Issues/PRs references
#8467. @