Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#37 alignment errors

v1.0_(example)
closed
Jan Breuer
None
5
2013-11-04
2012-09-18
Anonymous
No

on ARM processor and while running as a slave I get alignment errors:
Sep 17 13:23:48 mydevice user.warn kernel: [ 2981.720000] Alignment trap: ptpd2 (665) PC=0x0000fbe8 Instr=0xe1d503bd Address=0x000262bd FSR 0x013

This is my (ugly) fix:

diff -urN a/dep/msg.c b/dep/msg.c
--- a/dep/msg.c 2012-09-17 17:01:41.482262115 +0200
+++ b/dep/msg.c 2012-09-17 17:02:15.819679621 +0200
@@ -1421,7 +1421,8 @@
flip16(*(UInteger16 *) (buf + 50));
announce->grandmasterPriority2 = *(UInteger8 *) (buf + 52);
copyClockIdentity(announce->grandmasterIdentity, (buf + 53));
- announce->stepsRemoved = flip16(*(UInteger16 *) (buf + 61));
+// announce->stepsRemoved = flip16(*(UInteger16 *) (buf + 61));
+ { UInteger16 j; memcpy(&j, buf + 61, sizeof(UInteger16)); announce->stepsRemoved = flip16(j); }
announce->timeSource = *(Enumeration8 *) (buf + 63);

#ifdef PTPD_DBG

Related

Bugs: #40

Discussion

  • Jan Breuer
    Jan Breuer
    2013-09-17

    • status: open --> accepted
    • assigned_to: Jan Breuer
    • Group: --> v1.0_(example)
     
  • Jan Breuer
    Jan Breuer
    2013-09-17

    • status: accepted --> pending
     
  • Jan Breuer
    Jan Breuer
    2013-11-04

    • status: pending --> closed