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