]> git.pld-linux.org Git - packages/gawk.git/blame - gawk-unaligned.patch
- use ${TEMDIR:-/tmp} instead /tmp in base directory name for temporary files.
[packages/gawk.git] / gawk-unaligned.patch
CommitLineData
20900745 1
2From davidm@AZStarNet.com Mon Sep 2 10:39:42 1996
3Date: Sun, 1 Sep 1996 21:06:10 -0700
4From: David Mosberger-Tang <davidm@AZStarNet.com>
5To: ewt@redhat.com
6Cc: richard@atheist.tamu.edu
7Subject: awk fix
8
9The patch below fixes the unaligned accesses. This is a genuine bug,
10so it's better to fix it asap (not that unaligned accesses are not
11worth fixing...).
12
13The problem is as follows: re_syntax_options is a bss symbol in libc
14that is 4 bytes long. GNU awk comes with its own regex.{h,c} files
15and there, that variable is declared as an `unsigned long' common
16symbol. The runtimes linker then resolves that symbol to the instance
17in the shared library. So gawk accesses that variable as a "long"
18while in reality it's just 4 bytes long.
19
20Actually, the linker warns about this. Probably good to keep an eye
21open for these:
22
23ld: Warning: size of symbol `re_syntax_options' changed from 8 to 4 in /lib/libc.so.6
24
25 --david
26
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
29@@ -920,7 +920,7 @@
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;
35
36
37 /* Specify the precise syntax of regexps for compilation. This provides
This page took 0.064733 seconds and 4 git commands to generate.