From bug-octave-request at bevo dot che dot wisc dot edu Fri Jan 30 14:31:31 2004 Subject: [PATCH] types mismatch between Array-flags.h and Array-flags.cc From: "John W. Eaton" To: Jakub Bogusz Cc: bug-octave at bevo dot che dot wisc dot edu Date: Fri, 30 Jan 2004 14:27:57 -0600 On 28-Jan-2004, Jakub Bogusz wrote: | I found a type mismatch between liboctave/Array-flags.h and | liboctave/Array-flags.cc in octave 2.1.53 (the same was in 2.1.52): | liboctave_{wfi,wrore}_flag variables are defined as bools in | Array-flags.cc, but extern declarations in Array-flags.h say they | are ints. | It causes at least unaligned memory accesses - causing SIGBUS on | sparc-linux (octave didn't work at all) and unaligned traps on | alpha-linux platform. | | This patch fixes types mismatch, avoiding unaligned memory accesses (and | other possible related errors). | | | -- | Jakub Bogusz http://cyber.cs.net.pl/~qboosh/ | PLD Team http://www.pld-linux.org/ | --- octave-2.1.53/liboctave/Array-flags.h.orig 2003-07-11 22:21:17.000000000 +0000 | +++ octave-2.1.53/liboctave/Array-flags.h 2004-01-28 20:26:07.000000000 +0000 | at @ -21,8 +21,8 @@ | */ | | #if defined (OCTAVE_SOURCE) | -extern int liboctave_wfi_flag; | -extern int liboctave_wrore_flag; | +extern bool liboctave_wfi_flag; | +extern bool liboctave_wrore_flag; | #endif | | /* I made this change. Thanks, jwe ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------