Skip to content

Commit

Permalink
Fix bus error on ARM platforms
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
adiknoth committed Jan 27, 2014
1 parent aea850a commit 0b03e2b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions types.h
Expand Up @@ -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
Expand Down

0 comments on commit 0b03e2b

Please sign in to comment.