qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From astitc...@apache.org
Subject svn commit: r1530302 - in /qpid/trunk/qpid/cpp/src/qpid/legacystore/jrnl: deq_rec.cpp enq_rec.cpp txn_rec.cpp
Date Tue, 08 Oct 2013 15:09:06 GMT
Author: astitcher
Date: Tue Oct  8 15:09:05 2013
New Revision: 1530302

URL: http://svn.apache.org/r1530302
Log:
QPID-5129: Alignment issues on ARM

Modified:
    qpid/trunk/qpid/cpp/src/qpid/legacystore/jrnl/deq_rec.cpp
    qpid/trunk/qpid/cpp/src/qpid/legacystore/jrnl/enq_rec.cpp
    qpid/trunk/qpid/cpp/src/qpid/legacystore/jrnl/txn_rec.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/legacystore/jrnl/deq_rec.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/legacystore/jrnl/deq_rec.cpp?rev=1530302&r1=1530301&r2=1530302&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/legacystore/jrnl/deq_rec.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/legacystore/jrnl/deq_rec.cpp Tue Oct  8 15:09:05 2013
@@ -270,12 +270,14 @@ deq_rec::decode(rec_hdr& h, void* rptr, 
         // Get and check header
         _deq_hdr.hdr_copy(h);
         rd_cnt = sizeof(rec_hdr);
-        _deq_hdr._deq_rid = *(u_int64_t*)((char*)rptr + rd_cnt);
+        //_deq_hdr._deq_rid = *(u_int64_t*)((char*)rptr + rd_cnt);
+        std::memcpy((void*)&_deq_hdr._deq_rid, (char*)rptr + rd_cnt, sizeof(u_int64_t));
         rd_cnt += sizeof(u_int64_t);
 #if defined(JRNL_BIG_ENDIAN) && defined(JRNL_32_BIT)
         rd_cnt += sizeof(u_int32_t); // Filler 0
 #endif
-        _deq_hdr._xidsize = *(std::size_t*)((char*)rptr + rd_cnt);
+        //_deq_hdr._xidsize = *(std::size_t*)((char*)rptr + rd_cnt);
+        std::memcpy((void*)&_deq_hdr._xidsize, (char*)rptr + rd_cnt, sizeof(std::size_t));
         rd_cnt = _deq_hdr.size();
         chk_hdr();
         if (_deq_hdr._xidsize)

Modified: qpid/trunk/qpid/cpp/src/qpid/legacystore/jrnl/enq_rec.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/legacystore/jrnl/enq_rec.cpp?rev=1530302&r1=1530301&r2=1530302&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/legacystore/jrnl/enq_rec.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/legacystore/jrnl/enq_rec.cpp Tue Oct  8 15:09:05 2013
@@ -360,7 +360,8 @@ enq_rec::decode(rec_hdr& h, void* rptr, 
 #if defined(JRNL_BIG_ENDIAN) && defined(JRNL_32_BIT)
         rd_cnt += sizeof(u_int32_t); // Filler 0
 #endif
-        _enq_hdr._xidsize = *(std::size_t*)((char*)rptr + rd_cnt);
+        //_enq_hdr._xidsize = *(std::size_t*)((char*)rptr + rd_cnt);
+        std::memcpy((void*)&_enq_hdr._xidsize, (char*)rptr + rd_cnt, sizeof(std::size_t));
         rd_cnt += sizeof(std::size_t);
 #if defined(JRNL_LITTLE_ENDIAN) && defined(JRNL_32_BIT)
         rd_cnt += sizeof(u_int32_t); // Filler 0
@@ -368,7 +369,8 @@ enq_rec::decode(rec_hdr& h, void* rptr, 
 #if defined(JRNL_BIG_ENDIAN) && defined(JRNL_32_BIT)
         rd_cnt += sizeof(u_int32_t); // Filler 1
 #endif
-        _enq_hdr._dsize = *(std::size_t*)((char*)rptr + rd_cnt);
+        //_enq_hdr._dsize = *(std::size_t*)((char*)rptr + rd_cnt);
+        std::memcpy((void*)&_enq_hdr._dsize, (char*)rptr + rd_cnt, sizeof(std::size_t));
         rd_cnt = _enq_hdr.size();
         chk_hdr();
         if (_enq_hdr._xidsize + (_enq_hdr.is_external() ? 0 : _enq_hdr._dsize))

Modified: qpid/trunk/qpid/cpp/src/qpid/legacystore/jrnl/txn_rec.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/legacystore/jrnl/txn_rec.cpp?rev=1530302&r1=1530301&r2=1530302&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/legacystore/jrnl/txn_rec.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/legacystore/jrnl/txn_rec.cpp Tue Oct  8 15:09:05 2013
@@ -270,7 +270,8 @@ txn_rec::decode(rec_hdr& h, void* rptr, 
 #if defined(JRNL_BIG_ENDIAN) && defined(JRNL_32_BIT)
         rd_cnt += sizeof(u_int32_t); // Filler 0
 #endif
-        _txn_hdr._xidsize = *(std::size_t*)((char*)rptr + rd_cnt);
+        //_txn_hdr._xidsize = *(std::size_t*)((char*)rptr + rd_cnt);
+        std::memcpy((void*)&_txn_hdr._xidsize, (char*)rptr + rd_cnt, sizeof(std::size_t));
         rd_cnt = _txn_hdr.size();
         chk_hdr();
         _buff = std::malloc(_txn_hdr._xidsize);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message