Closed mdavidsaver closed 3 years ago
Never mind. It's all dead code...
ByteBuffer::align()
exists to implement SerializableControl::alignBuffer()
and DeserializableControl::alignData()
. However, none of these methods are called in pvDataCPP or pvAccessCPP outside of test code.
Dead code removed with 07b79693af66812c02044c36f1eb2e7cc3cabe8c and https://github.com/epics-base/pvAccessCPP/commit/3b2261a61f15a3d2a46f53ca263112a4fc492d16. All remaining tests pass with RTEMS 4.x.
In looking to extend CI testing to RTEMS I find that testByteByffer is failing with 4.10 (passes with 4.9). A prime example of why we should be running tests for embedded targets more often.
The failure seen is:
Printing some additional detail shows this to be:
Investigating further. For at least RTEMS4.10 + pc386, the root cause seems to be that
malloc()
can return a pointer aligned only to 4 bytes. The test is checking for at least 8 byte alignment. The implementation ofByteBuffer::align()
assumes this.I'm don't know yet if this has any practical implications. Both 4.9 and 4.10 pass with a mvme3100 emulator, but this could be a coincidence.
cf. #54 #65