Browse Source

Fix bus error on ARM platforms

With the current code, packed structs lead to unaligned memory access,
thus causing SIGBUS on ARM.

Let's disable packing on ARM for now. Since it's only used for mixed
32/64bit jackd installations and we're not facing such a scenario on
ARM, there's little use to worry more atm.

(Commit message copied from jackd2's 2f7d512b, since it's the same
problem)
pull/3/head
Adrian Knoth 11 years ago
parent
commit
0b03e2b6a7
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      types.h

+ 4
- 0
types.h View File

@@ -38,7 +38,11 @@ typedef int32_t jack_shmsize_t;
than use the natural alignment of the processor and/or
compiler.
*/
#ifdef __arm__
# define POST_PACKED_STRUCTURE
#else
# define POST_PACKED_STRUCTURE __attribute__((__packed__))
#endif /* ARM */
#else
/* Add other things here for non-gcc platforms */
#endif


Loading…
Cancel
Save