[libvirt] [PATCH v2] Fix dbus message reading code on big endian hosts

2013-07-29 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The way we were casting small (32bit) integers was broken on big endian hosts, causing stack smashing. This was detected in the test suite either by test failures due to incorrect results, or by libc/gcc abort'ing with its stack canary triggered. In

Re: [libvirt] [PATCH v2] Fix dbus message reading code on big endian hosts

2013-07-29 Thread Eric Blake
On 07/29/2013 10:40 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The way we were casting small (32bit) integers was broken on big endian hosts, causing stack smashing. This was detected in the test suite either by test failures due to incorrect results, or by

Re: [libvirt] [PATCH v2] Fix dbus message reading code on big endian hosts

2013-07-29 Thread Daniel P. Berrange
On Mon, Jul 29, 2013 at 10:46:25AM -0600, Eric Blake wrote: On 07/29/2013 10:40 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The way we were casting small (32bit) integers was broken on big endian hosts, causing stack smashing. This was detected in the

Re: [libvirt] [PATCH v2] Fix dbus message reading code on big endian hosts

2013-07-29 Thread Jiri Denemark
On Mon, Jul 29, 2013 at 17:57:55 +0100, Daniel Berrange wrote: On Mon, Jul 29, 2013 at 10:46:25AM -0600, Eric Blake wrote: On 07/29/2013 10:40 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The way we were casting small (32bit) integers was broken on big

Re: [libvirt] [PATCH v2] Fix dbus message reading code on big endian hosts

2013-07-29 Thread Eric Blake
On 07/29/2013 10:57 AM, Daniel P. Berrange wrote: case DBUS_TYPE_UINT16: -GET_NEXT_VAL(dbus_uint16_t, unsigned int, %d); +GET_NEXT_VAL(dbus_uint16_t, short unsigned, %d); Works, but 'unsigned short' is a bit more typical. Ok, will change it. ACK.