Updates.
[libsigsegv/ericb.git] / PORTING
blob9499c2ccd88b8eddd81c1754cc5f5d8088aa85c1
1 Successfully tested platforms
2 =============================
4 __PLATFORM__________________________________SIGSEGV__STACK_OVERFLOW__VERSION___
5                                            |         |           |
6 alpha-dec-osf4.0d                          |   yes   |   yes     | 2.1
7 alpha-dec-osf4.0f                          |   yes   |   yes     | 2.1
8 alphaev56-dec-osf4.0f                      |   yes   |   yes     | 2.4
9 alpha-dec-osf4.0g                          |   yes   |   yes     | 2.1
10 alpha-dec-osf5.1                           |   yes   |   yes     | 2.1
11 alphaev67-dec-osf5.1                       |   yes   |   yes     | 2.2
12 alpha-unknown-freebsd4.8                   |   yes   |   yes     | 2.1
13 alpha-portbld-freebsd5.5                   |   yes   |   yes     | 2.3
14 alphaev67-unknown-linux2.4.17-gnu-glibc2.1 |   yes   |   yes     | 1.95
15 alphaev6-unknown-linux2.2.19-gnu-glibc2.2  |   yes   |   yes     | 2.1
16 alphaev67-unknown-linux2.2.20-gnu-glibc2.2 |   yes   |   yes     | 2.1
17 alphaev67-unknown-linux2.4.4-gnu-glibc2.2  |   yes   |   yes     | 2.1
18 alphaev6-unknown-linux2.4.9-gnu-glibc2.2   |   yes   |   yes     | 2.1
19 alphaev67-unknown-linux2.4.9-gnu-glibc2.2  |   yes   |   yes     | 2.1
20 alphaev6-unknown-linux2.4.18-gnu-glibc2.2  |   yes   |   yes     | 2.1
21 alphaev67-unknown-linux2.4.18-gnu-glibc2.2 |   yes   |   yes     | 2.1
22 alpha-unknown-linux2.4.19-gnu-glibc2.3     |   yes   |   yes     | 2.4
23 alphaev68-unknown-linux2.6.11-gnu-glibc2.3 |   yes   |   yes     | 2.2
24 alpha-unknown-openbsd3.7                   |   yes   |   yes     | 2.2
25 alpha-unknown-netbsd1.6                    |   yes   |   yes     | 2.1
26 armv4l-unknown-linux2.4.0-gnu-glibc2.2     |   no    |   yes     | 2.1
27 armv4l-unknown-linux2.4.3-gnu-glibc2.2     |   yes   |   yes     | 2.1
28 armv4l-unknown-linux2.4.9-gnu-glibc2.2     |   no    |   yes     | 2.0.1
29 armv5tel-unknown-linux2.4.20-gnu-glibc2.2  |   yes   |   yes     | 2.2
30 armv6l-unknown-linux2.6.18-gnu-glibc2.3    |   yes   |   yes     | 2.4
31 arm-angstrom-linux2.6.23-gnueabi-glibc2.4  |   yes   |   yes     | 2.5
32 hppa1.1-hp-hpux11.00                       |   yes   |   yes     | 2.1
33 hppa2.0-hp-hpux10.20                       |   yes   |   yes     | 2.2
34 hppa2.0w-hp-hpux11.00                      |   yes   |   yes     | 2.2
35 hppa2.0w-hp-hpux11.11                      |   yes   |   yes     | 2.4
36 hppa-unknown-linux2.4.19-gnu-glibc2.2      |   yes   |   yes     | 2.0.1
37 hppa64-unknown-linux2.4.17-gnu-glibc2.2    |   yes   |   yes     | 2.1
38 hppa2.0-unknown-linux2.6.20.1-gnu-glibc2.3 |   yes   |   no      | 2.4
39 i586-pc-beos                               |   no    |   yes     | 2.1
40 i686-pc-cygwin                             |   yes   |   yes     | 2.02
41 i686-pc-cygwin                             |   yes   |   yes     | 2.4
42 i386-apple-darwin8.6.1                     |   yes   |   yes     | 2.3
43 i686-apple-darwin8.6.1                     |   yes   |   yes     | 2.3
44 i386-apple-darwin8.8.1                     |   yes   |   yes     | 2.4
45 i386-apple-darwin8.8.2                     |   yes   |   yes     | 2.4
46 i386-apple-darwin8.8.3                     |   yes   |   yes     | 2.4
47 i386-apple-darwin8.9.1                     |   yes   |   yes     | 2.4
48 i386-apple-darwin8.10.1                    |   yes   |   yes     | 2.4
49 i386-apple-darwin8.11.1                    |   yes   |   yes     | 2.5
50 i386-apple-darwin9.0.0                     |   yes   |   yes     | 2.5
51 i386-apple-darwin9.1.0                     |   yes   |   yes     | 2.5
52 i386-apple-darwin9.2.2                     |   yes   |   yes     | 2.5
53 i386-apple-darwin9.4.0                     |   yes   |   yes     | 2.5
54 i586-pc-linux2.2.14-gnu-glibc2.1           |   yes   |   yes     | 2.1
55 i686-pc-linux2.2.14-gnu-glibc2.1           |   yes   |   yes     | 2.0
56 i686-pc-linux2.2.19-gnu-glibc2.1           |   yes   |   yes     | 1.95
57 i486-pc-linux2.2.21-gnu-glibc2.1           |   yes   |   yes     | 2.0
58 i586-pc-linux2.4.18-gnu-glibc2.1           |   yes   |   yes     | 2.0
59 i686-pc-linux2.4.19-gnu-glibc2.1           |   yes   |   yes     | 2.2
60 i686-pc-linux2.2.16-gnu-glibc2.2           |   yes   |   yes     | 2.0
61 i686-pc-linux2.2.19-gnu-glibc2.2           |   yes   |   yes     | 2.0
62 i686-pc-linux2.4.7-gnu-glibc2.2            |   yes   |   yes     | 2.1
63 i586-pc-linux2.4.9-gnu-glibc2.2            |   yes   |   yes     | 2.0
64 i686-pc-linux2.4.9-gnu-glibc2.2            |   yes   |   yes     | 2.0
65 i386-pc-linux2.4.18-gnu-glibc2.2           |   yes   |   yes     | 2.0
66 i686-pc-linux2.4.18-gnu-glibc2.2           |   yes   |   yes     | 2.0
67 i586-pc-linux2.4.19-gnu-glibc2.2           |   yes   |   yes     | 2.0
68 i686-pc-linux2.4.19-gnu-glibc2.2           |   yes   |   yes     | 2.0
69 i686-pc-linux2.4.20-gnu-glibc2.2           |   yes   |   yes     | 2.0
70 i586-pc-linux2.2.19-gnu-glibc2.3           |   yes   |   yes     | 2.1
71 i686-pc-linux2.4.18-gnu-glibc2.3           |   yes   |   yes     | 1.97
72 i486-pc-linux2.4.20-gnu-glibc2.3           |   yes   |   yes     | 2.0
73 i586-pc-linux2.4.20-gnu-glibc2.3           |   yes   |   yes     | 2.0
74 i686-pc-linux2.4.20-gnu-glibc2.3           |   yes   |   yes     | 2.0
75 i686-pc-linux2.4.21-gnu-glibc2.3           |   yes   |   yes     | 2.0
76 i586-pc-linux2.4.22-gnu-glibc2.3           |   yes   |   yes     | 2.0
77 i386-pc-mingw32                            |   yes   |   yes     | 2.4
78 i586-pc-mingw32                            |   yes   |   yes     | 2.1
79 i686-pc-mingw32                            |   yes   |   yes     | 2.5
80 i386-pc-os2-emx                            |   no    |   no      | 2.5
81 i386-pc-solaris2.9                         |   yes   |   yes     | 2.2
82 i386-pc-solaris2.10                        |   yes   |   yes     | 2.4
83 i386-pc-solaris2.11                        |   yes   |   yes     | 2.2
84 i686-pc-win32-msvc6                        |   yes   |   yes     | 1.96
85 i386-unknown-freebsd4.0                    |   yes   |   yes     | 2.1
86 i386-unknown-freebsd4.0-gnu-glibc2.3       |   yes   |   yes     | 2.1
87 i386-unknown-freebsd4.6                    |   yes   |   yes     | 1.95
88 i386-unknown-freebsd4.7                    |   yes   |   yes     | 2.1
89 i386-unknown-freebsd4.8                    |   yes   |   yes     | 2.1
90 i386-unknown-freebsd4.9                    |   yes   |   yes     | 2.2
91 i386-unknown-freebsd4.10                   |   yes   |   yes     | 2.2
92 i386-unknown-freebsd5.0                    |   yes   |   yes     | 2.4
93 i386-portbld-freebsd6.0                    |   yes   |   yes     | 2.3
94 i686-unknown-kfreebsd6.2-gnu-glibc2.6      |   yes   |   yes     | 2.5+
95 i386-unknown-netbsdelf1.6                  |   no    |   no      | 2.4
96 i386-unknown-netbsdelf2.0.2                |   yes   |   yes     | 2.4
97 i386-unknown-netbsdelf3.0                  |   yes   |   yes     | 2.4
98 i386-unknown-netbsd                        |   yes   |   no      | 2.2
99 i386-unknown-openbsd3.2                    |   yes   |   yes     | 2.3
100 i386-unknown-openbsd3.3                    |   yes   |   yes     | 2.1
101 i386-unknown-openbsd3.4                    |   yes   |   yes     | 2.2
102 i386-unknown-openbsd3.6                    |   yes   |   yes     | 2.1
103 i386-unknown-openbsd3.8                    |   yes   |   yes     | 2.4
104 i386-unknown-openbsd3.9                    |   yes   |   yes     | 2.4
105 i386-unknown-openbsd4.0                    |   yes   |   yes     | 2.5
106 ia64-portbld-freebsd7.0                    |   yes   |   no      | 2.3
107 ia64-hp-hpux11.22                          |   yes   |   no      | 2.1
108 ia64-hp-hpux11.23                          |   yes   |   no      | 2.2
109 ia64-unknown-linux2.4.18-gnu-glibc2.2      |   yes   |   yes     | 2.4
110 ia64-unknown-linux2.6.9-gnu-glibc2.3       |   yes   |   no      | 2.4
111 ia64-unknown-linux2.6.16.27-gnu-glibc2.4   |   yes   |   no      | 2.4
112 mips-sgi-irix6.5                           |   yes   |   yes     | 2.4
113 mips-unknown-linux2.4.27-gnu-glibc2.3      |   yes   |   yes     | 2.4
114 nsr-tandem-nsk                             |   no    |   no      | 2.1
115 rs6000-ibm-aix3.2.5                        |   yes   |   no      | 2.2
116 rs6000-ibm-aix4.2.0.0                      |   yes   |   yes     | 2.2
117 rs6000-ibm-aix4.2.1.0                      |   yes   |   yes     | 2.1
118 powerpc-ibm-aix4.3.2.0                     |   yes   |   yes     | 2.4
119 powerpc-ibm-aix4.3.3.0                     |   yes   |   yes     | 1.95
120 powerpc-ibm-aix5.1.0.0                     |   yes   |   yes     | 2.5
121 powerpc-ibm-aix5.2.0.0                     |   yes   |   yes     | 2.5
122 powerpc-ibm-aix5.3.0.0                     |   yes   |   yes     | 2.5
123 powerpc-apple-darwin5.5                    |   yes   |   yes     | 2.2
124 powerpc-apple-darwin6.0                    |   yes   |   yes     | 2.4
125 powerpc-apple-darwin6.8                    |   yes   |   yes     | 2.2
126 powerpc-apple-darwin7.7.0                  |   yes   |   yes     | 2.2
127 powerpc-apple-darwin7.8.0                  |   yes   |   yes     | 2.2
128 powerpc-apple-darwin7.9.0                  |   yes   |   yes     | 2.4
129 powerpc-apple-darwin8.1.0                  |   yes   |   yes     | 2.2
130 powerpc-apple-darwin8.3.0                  |   yes   |   yes     | 2.2
131 powerpc-apple-darwin8.4.0                  |   yes   |   yes     | 2.2
132 powerpc-apple-darwin8.7.0                  |   yes   |   yes     | 2.4
133 powerpc-apple-darwin8.8.0                  |   yes   |   yes     | 2.4
134 powerpc-apple-darwin8.9.0                  |   yes   |   yes     | 2.4
135 powerpc-apple-darwin8.10.0                 |   yes   |   yes     | 2.5
136 powerpc-apple-darwin8.11.0                 |   yes   |   yes     | 2.5
137 powerpc-apple-darwin8.11.1                 |   yes   |   yes     | 2.5
138 powerpc-apple-darwin9.2.0                  |   yes   |   yes     | 2.5
139 powerpc-unknown-linux2.2.17-gnu-glibc2.1   |   no    |   yes     | 1.95
140 powerpc-unknown-linux2.2.17-gnu-glibc2.2   |   yes   |   yes     | 2.0.1
141 powerpc-unknown-linux2.4.19-gnu-glibc2.2   |   yes   |   yes     | 2.4
142 powerpc-unknown-linux2.4.28-gnu-glibc2.2   |   yes   |   yes     | 2.1
143 powerpc-unknown-linux2.4.26-gnu-glibc2.3   |   yes   |   yes     | 2.1
144 powerpc-unknown-linux2.6.10-gnu-glibc2.3   |   yes   |   yes     | 2.2
145 powerpc-unknown-linux2.6.16-gnu-glibc2.3   |   yes   |   yes     | 2.4
146 powerpc-unknown-netbsd2.0                  |   yes   |   no      | 2.1
147 powerpc-unknown-netbsd3.99.23              |   yes   |   yes     | 2.4
148 powerpc-unknown-openbsd4.0                 |   yes   |   yes     | 2.4
149 powerpc-unknown-openbsd4.1                 |   yes   |   yes     | 2.4
150 powerpc64-unknown-linux2.6.5-gnu-glibc2.3  |   yes   |   yes     | 2.4
151 s390x-ibm-linux2.6.16.46-gnu-glibc2.4      |   no    |   yes     | 2.5
152 sparc-unknown-linux2.4.32-gnu-glibc2.3     |   yes   |   no      | 2.1
153 sparc-unknown-openbsd3.9                   |   yes   |   no      | 2.4
154 sparc-sun-solaris2.5.1                     |   yes   |   yes     | 2.2
155 sparc-sun-solaris2.6                       |   yes   |   yes     | 2.2
156 sparc-sun-solaris2.7                       |   yes   |   yes     | 2.4
157 sparc-sun-solaris2.8                       |   yes   |   yes     | 2.5
158 sparc-sun-solaris2.9                       |   yes   |   yes     | 2.4
159 sparc-sun-solaris2.10                      |   yes   |   yes     | 2.5
160 sparc-sun-solaris2.11                      |   yes   |   yes     | 2.4
161 sparc64-unknown-linux2.2.18-gnu-glibc2.1   |   no    |   no      | 1.95
162 sparc64-unknown-linux2.4.28-gnu-glibc2.3   |   yes   |   no      | 2.4
163 sparc64-unknown-openbsd3.6                 |   no    |   no      | 2.2
164 x86_64-unknown-kfreebsd6.2-gnu-glibc2.6    |   yes   |   yes     | 2.5+
165 x86_64-unknown-linux2.4.21-gnu-glibc2.2    |   yes   |   yes     | 2.1
166 x86_64-unknown-linux2.4.21-gnu-glibc2.3    |   yes   |   yes     | 2.1
167 x86_64-unknown-linux2.6.3-gnu-glibc2.3     |   yes   |   yes     | 2.1
168 x86_64-unknown-linux2.6.9-gnu-glibc2.3     |   yes   |   yes     | 2.4
169 x86_64-unknown-linux2.6.11.4-gnu-glibc2.3  |   yes   |   yes     | 2.4
170 x86_64-unknown-linux2.6.13-gnu-glibc2.3    |   yes   |   yes     | 2.4
171 x86_64-unknown-linux2.6.16-gnu-glibc2.4    |   yes   |   yes     | 2.4
172 x86_64-unknown-linux2.6.16.13-gnu-glibc2.4 |   yes   |   yes     | 2.4
173 x86_64-unknown-linux2.6.16.21-gnu-glibc2.4 |   yes   |   yes     | 2.4
174 x86_64-unknown-linux2.6.17-gnu-glibc2.4    |   yes   |   yes     | 2.4
175 x86_64-unknown-linux2.6.20-gnu-glibc2.5    |   yes   |   yes     | 2.4
176 x86_64-unknown-linux2.6.20.1-gnu-glibc2.5  |   yes   |   yes     | 2.4
177 x86_64-unknown-linux2.6.21-gnu-glibc2.6    |   yes   |   yes     | 2.4
178 x86_64-unknown-netbsd3.0                   |   yes   |   yes     | 2.4
179 amd64-portbld-freebsd5.4                   |   yes   |   yes     | 2.2
180 amd64-portbld-freebsd6.0                   |   yes   |   yes     | 2.3
181 amd64-portbld-freebsd7.0                   |   yes   |   yes     | 2.3
184 On FreeBSD 5.2, libsigsegv works best if the /proc filesystem is mounted.
185 (It is not mounted by default.)
188 Porting to new platforms
189 ========================
191 On Unix systems, where faults are notified to the program through a signal
192 handler, the core routines in handler-unix.c can be used without
193 modifications. But they need the following bits of information. Each of
194 them is stored in a platform dependent file; the file is chosen in configure.
196   * List of signals that are sent when an invalid virtual memory address
197     is accessed, or when the stack overflows.
198     This is a file among signals-*.h.
199     configure chooses and sets the variable CFG_SIGNALS.
201   * What arguments are passed to a fault handler.
202     This is a file among fault-*.h.
203     configure chooses and sets the variable CFG_FAULT.
205   * How to determine the stack's virtual memory area.
206     This is a file among stackvma-*.c.
207     configure chooses and sets the variable CFG_STACKVMA.
209   * How to leave a signal handler that is executing on the alternate
210     signal stack.
211     This is a file among leave-*.c.
212     configure chooses and sets the variable CFG_LEAVE.
214 For each of these, the approach should be:
216   - Find a way to implement the needed functionality.  This might involve
217     study of the system include files (in particular <signal.h> and
218     <ucontext.h>) and of the kernel sources.
219     For CFG_FAULT, the best starting point is to run the tests/sigsegv1
220     program with a breakpoint set at 'sigsegv_handler'.
222   - Add to configure.in a test whether your new code works.  This will
223     help portability to platforms similar to yours.
224     Then regenerate the configure script (run "autoconf") and verify
225     that the test says "yes" on your platform.
227   - Create a platform dependent file (e.g. fault-<os>-<cpu>.h) and change
228     configure.in to choose this particular file when your test says "yes".
229     Then regenerate the configure script (run "autoconf").
231   - Verify that "make" and "make check" pass.
233 For non-Unix systems, a separate handler-<os>.c is likely to be needed.