Bug #3294
closed
- Subject changed from ndn-cxx tests fail on big endian machines like s390(x) or ppc64 to Interest::getNonce and Name::compare fail on big endian
- Description updated (diff)
- Category set to Base
- Target version set to Unsupported
Fedora is not a supported platform, although I believe this bug would also appear on Ubuntu which has ppc64 releases.
- Subject changed from Interest::getNonce and Name::compare fail on big endian to Interest::getNonce and Name::compare fail on big endian platforms
susmit shannigrahi wrote:
This is still happening in 0.4.0. I thought we fixed it, no?
Uhm no... we fixed Name::compare
, but there are other failures in your report, probably endian-related, and I don't think anyone tried to fix those.
Davide Pesavento wrote:
Uhm no... we fixed Name::compare
, but there are other failures in your report, probably endian-related, and I don't think anyone tried to fix those.
tlv.hpp uses be16toh, be32toh and be64toh before returning values. The test compares 1U to the returned value. There is a conversion mismatch somewhere.
- % Done changed from 0 to 50
I don't see what's wrong with getNonce
, there's nothing endian-specific there. However, decoding of the nonce field may be wrong, the code only does a memcpy
but no endian-swap.
A related question is why are we using uint32_t
to represent the nonce instead of uint8_t[4]
?
- Status changed from New to Code review
- Assignee set to Davide Pesavento
- Target version changed from Unsupported to 0.8.0
- % Done changed from 50 to 100
- Status changed from Code review to Closed
Also available in: Atom
PDF