2 From davidm@AZStarNet.com Mon Sep 2 10:39:42 1996
3 Date: Sun, 1 Sep 1996 21:06:10 -0700
4 From: David Mosberger-Tang <davidm@AZStarNet.com>
6 Cc: richard@atheist.tamu.edu
9 The patch below fixes the unaligned accesses. This is a genuine bug,
10 so it's better to fix it asap (not that unaligned accesses are not
13 The problem is as follows: re_syntax_options is a bss symbol in libc
14 that is 4 bytes long. GNU awk comes with its own regex.{h,c} files
15 and there, that variable is declared as an `unsigned long' common
16 symbol. The runtimes linker then resolves that symbol to the instance
17 in the shared library. So gawk accesses that variable as a "long"
18 while in reality it's just 4 bytes long.
20 Actually, the linker warns about this. Probably good to keep an eye
23 ld: Warning: size of symbol `re_syntax_options' changed from 8 to 4 in /lib/libc.so.6
27 --- gawk-3.0.0/regex.c.~1~ Fri Dec 15 04:53:05 1995
28 +++ gawk-3.0.0/regex.c Sun Sep 1 19:10:54 1996
30 syntax, so it can be changed between regex compilations. */
31 /* This has no initializer because initialized variables in Emacs
32 become read-only after dumping. */
33 -reg_syntax_t re_syntax_options;
34 +reg_syntax_t re_syntax_options = 0;
37 /* Specify the precise syntax of regexps for compilation. This provides