From bug-octave-request at bevo dot che dot wisc dot edu Wed Jan 28 23:15:37 2004 Subject: [PATCH] types mismatch between Array-flags.h and Array-flags.cc From: Jakub Bogusz To: bug-octave at bevo dot che dot wisc dot edu Date: Wed, 28 Jan 2004 17:01:46 -0600 --opJtzjQTFsWo+cga Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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/ --opJtzjQTFsWo+cga Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="octave-types.patch" --- 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 /* --opJtzjQTFsWo+cga-- ------------------------------------------------------------- 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 -------------------------------------------------------------