new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git] / src / external / pcre2-10.32 / doc / html / pcre2build.html
1 <html>
2 <head>
3 <title>pcre2build specification</title>
4 </head>
5 <body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
6 <h1>pcre2build man page</h1>
7 <p>
8 Return to the <a href="index.html">PCRE2 index page</a>.
9 </p>
10 <p>
11 This page is part of the PCRE2 HTML documentation. It was generated
12 automatically from the original man page. If there is any nonsense in it,
13 please consult the man page, in case the conversion went wrong.
14 <br>
15 <ul>
16 <li><a name="TOC1" href="#SEC1">BUILDING PCRE2</a>
17 <li><a name="TOC2" href="#SEC2">PCRE2 BUILD-TIME OPTIONS</a>
18 <li><a name="TOC3" href="#SEC3">BUILDING 8-BIT, 16-BIT AND 32-BIT LIBRARIES</a>
19 <li><a name="TOC4" href="#SEC4">BUILDING SHARED AND STATIC LIBRARIES</a>
20 <li><a name="TOC5" href="#SEC5">UNICODE AND UTF SUPPORT</a>
21 <li><a name="TOC6" href="#SEC6">DISABLING THE USE OF \C</a>
22 <li><a name="TOC7" href="#SEC7">JUST-IN-TIME COMPILER SUPPORT</a>
23 <li><a name="TOC8" href="#SEC8">NEWLINE RECOGNITION</a>
24 <li><a name="TOC9" href="#SEC9">WHAT \R MATCHES</a>
25 <li><a name="TOC10" href="#SEC10">HANDLING VERY LARGE PATTERNS</a>
26 <li><a name="TOC11" href="#SEC11">LIMITING PCRE2 RESOURCE USAGE</a>
27 <li><a name="TOC12" href="#SEC12">CREATING CHARACTER TABLES AT BUILD TIME</a>
28 <li><a name="TOC13" href="#SEC13">USING EBCDIC CODE</a>
29 <li><a name="TOC14" href="#SEC14">PCRE2GREP SUPPORT FOR EXTERNAL SCRIPTS</a>
30 <li><a name="TOC15" href="#SEC15">PCRE2GREP OPTIONS FOR COMPRESSED FILE SUPPORT</a>
31 <li><a name="TOC16" href="#SEC16">PCRE2GREP BUFFER SIZE</a>
32 <li><a name="TOC17" href="#SEC17">PCRE2TEST OPTION FOR LIBREADLINE SUPPORT</a>
33 <li><a name="TOC18" href="#SEC18">INCLUDING DEBUGGING CODE</a>
34 <li><a name="TOC19" href="#SEC19">DEBUGGING WITH VALGRIND SUPPORT</a>
35 <li><a name="TOC20" href="#SEC20">CODE COVERAGE REPORTING</a>
36 <li><a name="TOC21" href="#SEC21">SUPPORT FOR FUZZERS</a>
37 <li><a name="TOC22" href="#SEC22">OBSOLETE OPTION</a>
38 <li><a name="TOC23" href="#SEC23">SEE ALSO</a>
39 <li><a name="TOC24" href="#SEC24">AUTHOR</a>
40 <li><a name="TOC25" href="#SEC25">REVISION</a>
41 </ul>
42 <br><a name="SEC1" href="#TOC1">BUILDING PCRE2</a><br>
43 <P>
44 PCRE2 is distributed with a <b>configure</b> script that can be used to build
45 the library in Unix-like environments using the applications known as
46 Autotools. Also in the distribution are files to support building using
47 <b>CMake</b> instead of <b>configure</b>. The text file
48 <a href="README.txt"><b>README</b></a>
49 contains general information about building with Autotools (some of which is
50 repeated below), and also has some comments about building on various operating
51 systems. There is a lot more information about building PCRE2 without using
52 Autotools (including information about using <b>CMake</b> and building "by
53 hand") in the text file called
54 <a href="NON-AUTOTOOLS-BUILD.txt"><b>NON-AUTOTOOLS-BUILD</b>.</a>
55 You should consult this file as well as the
56 <a href="README.txt"><b>README</b></a>
57 file if you are building in a non-Unix-like environment.
58 </P>
59 <br><a name="SEC2" href="#TOC1">PCRE2 BUILD-TIME OPTIONS</a><br>
60 <P>
61 The rest of this document describes the optional features of PCRE2 that can be
62 selected when the library is compiled. It assumes use of the <b>configure</b>
63 script, where the optional features are selected or deselected by providing
64 options to <b>configure</b> before running the <b>make</b> command. However, the
65 same options can be selected in both Unix-like and non-Unix-like environments
66 if you are using <b>CMake</b> instead of <b>configure</b> to build PCRE2.
67 </P>
68 <P>
69 If you are not using Autotools or <b>CMake</b>, option selection can be done by
70 editing the <b>config.h</b> file, or by passing parameter settings to the
71 compiler, as described in
72 <a href="NON-AUTOTOOLS-BUILD.txt"><b>NON-AUTOTOOLS-BUILD</b>.</a>
73 </P>
74 <P>
75 The complete list of options for <b>configure</b> (which includes the standard
76 ones such as the selection of the installation directory) can be obtained by
77 running
78 <pre>
79   ./configure --help
80 </pre>
81 The following sections include descriptions of "on/off" options whose names
82 begin with --enable or --disable. Because of the way that <b>configure</b>
83 works, --enable and --disable always come in pairs, so the complementary option
84 always exists as well, but as it specifies the default, it is not described.
85 Options that specify values have names that start with --with. At the end of a
86 <b>configure</b> run, a summary of the configuration is output.
87 </P>
88 <br><a name="SEC3" href="#TOC1">BUILDING 8-BIT, 16-BIT AND 32-BIT LIBRARIES</a><br>
89 <P>
90 By default, a library called <b>libpcre2-8</b> is built, containing functions
91 that take string arguments contained in arrays of bytes, interpreted either as
92 single-byte characters, or UTF-8 strings. You can also build two other
93 libraries, called <b>libpcre2-16</b> and <b>libpcre2-32</b>, which process
94 strings that are contained in arrays of 16-bit and 32-bit code units,
95 respectively. These can be interpreted either as single-unit characters or
96 UTF-16/UTF-32 strings. To build these additional libraries, add one or both of
97 the following to the <b>configure</b> command:
98 <pre>
99   --enable-pcre2-16
100   --enable-pcre2-32
101 </pre>
102 If you do not want the 8-bit library, add
103 <pre>
104   --disable-pcre2-8
105 </pre>
106 as well. At least one of the three libraries must be built. Note that the POSIX
107 wrapper is for the 8-bit library only, and that <b>pcre2grep</b> is an 8-bit
108 program. Neither of these are built if you select only the 16-bit or 32-bit
109 libraries.
110 </P>
111 <br><a name="SEC4" href="#TOC1">BUILDING SHARED AND STATIC LIBRARIES</a><br>
112 <P>
113 The Autotools PCRE2 building process uses <b>libtool</b> to build both shared
114 and static libraries by default. You can suppress an unwanted library by adding
115 one of
116 <pre>
117   --disable-shared
118   --disable-static
119 </pre>
120 to the <b>configure</b> command.
121 </P>
122 <br><a name="SEC5" href="#TOC1">UNICODE AND UTF SUPPORT</a><br>
123 <P>
124 By default, PCRE2 is built with support for Unicode and UTF character strings.
125 To build it without Unicode support, add
126 <pre>
127   --disable-unicode
128 </pre>
129 to the <b>configure</b> command. This setting applies to all three libraries. It
130 is not possible to build one library with Unicode support, and another without,
131 in the same configuration.
132 </P>
133 <P>
134 Of itself, Unicode support does not make PCRE2 treat strings as UTF-8, UTF-16
135 or UTF-32. To do that, applications that use the library can set the PCRE2_UTF
136 option when they call <b>pcre2_compile()</b> to compile a pattern.
137 Alternatively, patterns may be started with (*UTF) unless the application has
138 locked this out by setting PCRE2_NEVER_UTF.
139 </P>
140 <P>
141 UTF support allows the libraries to process character code points up to
142 0x10ffff in the strings that they handle. Unicode support also gives access to
143 the Unicode properties of characters, using pattern escapes such as \P, \p,
144 and \X. Only the general category properties such as <i>Lu</i> and <i>Nd</i> are
145 supported. Details are given in the
146 <a href="pcre2pattern.html"><b>pcre2pattern</b></a>
147 documentation.
148 </P>
149 <P>
150 Pattern escapes such as \d and \w do not by default make use of Unicode
151 properties. The application can request that they do by setting the PCRE2_UCP
152 option. Unless the application has set PCRE2_NEVER_UCP, a pattern may also
153 request this by starting with (*UCP).
154 </P>
155 <br><a name="SEC6" href="#TOC1">DISABLING THE USE OF \C</a><br>
156 <P>
157 The \C escape sequence, which matches a single code unit, even in a UTF mode,
158 can cause unpredictable behaviour because it may leave the current matching
159 point in the middle of a multi-code-unit character. The application can lock it
160 out by setting the PCRE2_NEVER_BACKSLASH_C option when calling
161 <b>pcre2_compile()</b>. There is also a build-time option
162 <pre>
163   --enable-never-backslash-C
164 </pre>
165 (note the upper case C) which locks out the use of \C entirely.
166 </P>
167 <br><a name="SEC7" href="#TOC1">JUST-IN-TIME COMPILER SUPPORT</a><br>
168 <P>
169 Just-in-time (JIT) compiler support is included in the build by specifying
170 <pre>
171   --enable-jit
172 </pre>
173 This support is available only for certain hardware architectures. If this
174 option is set for an unsupported architecture, a building error occurs.
175 If in doubt, use
176 <pre>
177   --enable-jit=auto
178 </pre>
179 which enables JIT only if the current hardware is supported. You can check
180 if JIT is enabled in the configuration summary that is output at the end of a
181 <b>configure</b> run. If you are enabling JIT under SELinux you may also want to
182 add
183 <pre>
184   --enable-jit-sealloc
185 </pre>
186 which enables the use of an execmem allocator in JIT that is compatible with
187 SELinux. This has no effect if JIT is not enabled. See the
188 <a href="pcre2jit.html"><b>pcre2jit</b></a>
189 documentation for a discussion of JIT usage. When JIT support is enabled,
190 pcre2grep automatically makes use of it, unless you add
191 <pre>
192   --disable-pcre2grep-jit
193 </pre>
194 to the "configure" command.
195 </P>
196 <br><a name="SEC8" href="#TOC1">NEWLINE RECOGNITION</a><br>
197 <P>
198 By default, PCRE2 interprets the linefeed (LF) character as indicating the end
199 of a line. This is the normal newline character on Unix-like systems. You can
200 compile PCRE2 to use carriage return (CR) instead, by adding
201 <pre>
202   --enable-newline-is-cr
203 </pre>
204 to the <b>configure</b> command. There is also an --enable-newline-is-lf option,
205 which explicitly specifies linefeed as the newline character.
206 </P>
207 <P>
208 Alternatively, you can specify that line endings are to be indicated by the
209 two-character sequence CRLF (CR immediately followed by LF). If you want this,
210 add
211 <pre>
212   --enable-newline-is-crlf
213 </pre>
214 to the <b>configure</b> command. There is a fourth option, specified by
215 <pre>
216   --enable-newline-is-anycrlf
217 </pre>
218 which causes PCRE2 to recognize any of the three sequences CR, LF, or CRLF as
219 indicating a line ending. A fifth option, specified by
220 <pre>
221   --enable-newline-is-any
222 </pre>
223 causes PCRE2 to recognize any Unicode newline sequence. The Unicode newline
224 sequences are the three just mentioned, plus the single characters VT (vertical
225 tab, U+000B), FF (form feed, U+000C), NEL (next line, U+0085), LS (line
226 separator, U+2028), and PS (paragraph separator, U+2029). The final option is
227 <pre>
228   --enable-newline-is-nul
229 </pre>
230 which causes NUL (binary zero) to be set as the default line-ending character.
231 </P>
232 <P>
233 Whatever default line ending convention is selected when PCRE2 is built can be
234 overridden by applications that use the library. At build time it is
235 recommended to use the standard for your operating system.
236 </P>
237 <br><a name="SEC9" href="#TOC1">WHAT \R MATCHES</a><br>
238 <P>
239 By default, the sequence \R in a pattern matches any Unicode newline sequence,
240 independently of what has been selected as the line ending sequence. If you
241 specify
242 <pre>
243   --enable-bsr-anycrlf
244 </pre>
245 the default is changed so that \R matches only CR, LF, or CRLF. Whatever is
246 selected when PCRE2 is built can be overridden by applications that use the
247 library.
248 </P>
249 <br><a name="SEC10" href="#TOC1">HANDLING VERY LARGE PATTERNS</a><br>
250 <P>
251 Within a compiled pattern, offset values are used to point from one part to
252 another (for example, from an opening parenthesis to an alternation
253 metacharacter). By default, in the 8-bit and 16-bit libraries, two-byte values
254 are used for these offsets, leading to a maximum size for a compiled pattern of
255 around 64 thousand code units. This is sufficient to handle all but the most
256 gigantic patterns. Nevertheless, some people do want to process truly enormous
257 patterns, so it is possible to compile PCRE2 to use three-byte or four-byte
258 offsets by adding a setting such as
259 <pre>
260   --with-link-size=3
261 </pre>
262 to the <b>configure</b> command. The value given must be 2, 3, or 4. For the
263 16-bit library, a value of 3 is rounded up to 4. In these libraries, using
264 longer offsets slows down the operation of PCRE2 because it has to load
265 additional data when handling them. For the 32-bit library the value is always
266 4 and cannot be overridden; the value of --with-link-size is ignored.
267 </P>
268 <br><a name="SEC11" href="#TOC1">LIMITING PCRE2 RESOURCE USAGE</a><br>
269 <P>
270 The <b>pcre2_match()</b> function increments a counter each time it goes round
271 its main loop. Putting a limit on this counter controls the amount of computing
272 resource used by a single call to <b>pcre2_match()</b>. The limit can be changed
273 at run time, as described in the
274 <a href="pcre2api.html"><b>pcre2api</b></a>
275 documentation. The default is 10 million, but this can be changed by adding a
276 setting such as
277 <pre>
278   --with-match-limit=500000
279 </pre>
280 to the <b>configure</b> command. This setting also applies to the
281 <b>pcre2_dfa_match()</b> matching function, and to JIT matching (though the
282 counting is done differently).
283 </P>
284 <P>
285 The <b>pcre2_match()</b> function starts out using a 20KiB vector on the system
286 stack to record backtracking points. The more nested backtracking points there
287 are (that is, the deeper the search tree), the more memory is needed. If the
288 initial vector is not large enough, heap memory is used, up to a certain limit,
289 which is specified in kibibytes (units of 1024 bytes). The limit can be changed
290 at run time, as described in the
291 <a href="pcre2api.html"><b>pcre2api</b></a>
292 documentation. The default limit (in effect unlimited) is 20 million. You can
293 change this by a setting such as
294 <pre>
295   --with-heap-limit=500
296 </pre>
297 which limits the amount of heap to 500 KiB. This limit applies only to
298 interpretive matching in <b>pcre2_match()</b> and <b>pcre2_dfa_match()</b>, which
299 may also use the heap for internal workspace when processing complicated
300 patterns. This limit does not apply when JIT (which has its own memory
301 arrangements) is used.
302 </P>
303 <P>
304 You can also explicitly limit the depth of nested backtracking in the
305 <b>pcre2_match()</b> interpreter. This limit defaults to the value that is set
306 for --with-match-limit. You can set a lower default limit by adding, for
307 example,
308 <pre>
309   --with-match-limit_depth=10000
310 </pre>
311 to the <b>configure</b> command. This value can be overridden at run time. This
312 depth limit indirectly limits the amount of heap memory that is used, but
313 because the size of each backtracking "frame" depends on the number of
314 capturing parentheses in a pattern, the amount of heap that is used before the
315 limit is reached varies from pattern to pattern. This limit was more useful in
316 versions before 10.30, where function recursion was used for backtracking.
317 </P>
318 <P>
319 As well as applying to <b>pcre2_match()</b>, the depth limit also controls
320 the depth of recursive function calls in <b>pcre2_dfa_match()</b>. These are
321 used for lookaround assertions, atomic groups, and recursion within patterns.
322 The limit does not apply to JIT matching.
323 </P>
324 <br><a name="SEC12" href="#TOC1">CREATING CHARACTER TABLES AT BUILD TIME</a><br>
325 <P>
326 PCRE2 uses fixed tables for processing characters whose code points are less
327 than 256. By default, PCRE2 is built with a set of tables that are distributed
328 in the file <i>src/pcre2_chartables.c.dist</i>. These tables are for ASCII codes
329 only. If you add
330 <pre>
331   --enable-rebuild-chartables
332 </pre>
333 to the <b>configure</b> command, the distributed tables are no longer used.
334 Instead, a program called <b>dftables</b> is compiled and run. This outputs the
335 source for new set of tables, created in the default locale of your C run-time
336 system. This method of replacing the tables does not work if you are cross
337 compiling, because <b>dftables</b> is run on the local host. If you need to
338 create alternative tables when cross compiling, you will have to do so "by
339 hand".
340 </P>
341 <br><a name="SEC13" href="#TOC1">USING EBCDIC CODE</a><br>
342 <P>
343 PCRE2 assumes by default that it will run in an environment where the character
344 code is ASCII or Unicode, which is a superset of ASCII. This is the case for
345 most computer operating systems. PCRE2 can, however, be compiled to run in an
346 8-bit EBCDIC environment by adding
347 <pre>
348   --enable-ebcdic --disable-unicode
349 </pre>
350 to the <b>configure</b> command. This setting implies
351 --enable-rebuild-chartables. You should only use it if you know that you are in
352 an EBCDIC environment (for example, an IBM mainframe operating system).
353 </P>
354 <P>
355 It is not possible to support both EBCDIC and UTF-8 codes in the same version
356 of the library. Consequently, --enable-unicode and --enable-ebcdic are mutually
357 exclusive.
358 </P>
359 <P>
360 The EBCDIC character that corresponds to an ASCII LF is assumed to have the
361 value 0x15 by default. However, in some EBCDIC environments, 0x25 is used. In
362 such an environment you should use
363 <pre>
364   --enable-ebcdic-nl25
365 </pre>
366 as well as, or instead of, --enable-ebcdic. The EBCDIC character for CR has the
367 same value as in ASCII, namely, 0x0d. Whichever of 0x15 and 0x25 is <i>not</i>
368 chosen as LF is made to correspond to the Unicode NEL character (which, in
369 Unicode, is 0x85).
370 </P>
371 <P>
372 The options that select newline behaviour, such as --enable-newline-is-cr,
373 and equivalent run-time options, refer to these character values in an EBCDIC
374 environment.
375 </P>
376 <br><a name="SEC14" href="#TOC1">PCRE2GREP SUPPORT FOR EXTERNAL SCRIPTS</a><br>
377 <P>
378 By default, on non-Windows systems, <b>pcre2grep</b> supports the use of
379 callouts with string arguments within the patterns it is matching, in order to
380 run external scripts. For details, see the
381 <a href="pcre2grep.html"><b>pcre2grep</b></a>
382 documentation. This support can be disabled by adding
383 --disable-pcre2grep-callout to the <b>configure</b> command.
384 </P>
385 <br><a name="SEC15" href="#TOC1">PCRE2GREP OPTIONS FOR COMPRESSED FILE SUPPORT</a><br>
386 <P>
387 By default, <b>pcre2grep</b> reads all files as plain text. You can build it so
388 that it recognizes files whose names end in <b>.gz</b> or <b>.bz2</b>, and reads
389 them with <b>libz</b> or <b>libbz2</b>, respectively, by adding one or both of
390 <pre>
391   --enable-pcre2grep-libz
392   --enable-pcre2grep-libbz2
393 </pre>
394 to the <b>configure</b> command. These options naturally require that the
395 relevant libraries are installed on your system. Configuration will fail if
396 they are not.
397 </P>
398 <br><a name="SEC16" href="#TOC1">PCRE2GREP BUFFER SIZE</a><br>
399 <P>
400 <b>pcre2grep</b> uses an internal buffer to hold a "window" on the file it is
401 scanning, in order to be able to output "before" and "after" lines when it
402 finds a match. The default starting size of the buffer is 20KiB. The buffer
403 itself is three times this size, but because of the way it is used for holding
404 "before" lines, the longest line that is guaranteed to be processable is the
405 notional buffer size. If a longer line is encountered, <b>pcre2grep</b>
406 automatically expands the buffer, up to a specified maximum size, whose default
407 is 1MiB or the starting size, whichever is the larger. You can change the
408 default parameter values by adding, for example,
409 <pre>
410   --with-pcre2grep-bufsize=51200
411   --with-pcre2grep-max-bufsize=2097152
412 </pre>
413 to the <b>configure</b> command. The caller of \fPpcre2grep\fP can override
414 these values by using --buffer-size and --max-buffer-size on the command line.
415 </P>
416 <br><a name="SEC17" href="#TOC1">PCRE2TEST OPTION FOR LIBREADLINE SUPPORT</a><br>
417 <P>
418 If you add one of
419 <pre>
420   --enable-pcre2test-libreadline
421   --enable-pcre2test-libedit
422 </pre>
423 to the <b>configure</b> command, <b>pcre2test</b> is linked with the
424 <b>libreadline</b> or<b>libedit</b> library, respectively, and when its input is
425 from a terminal, it reads it using the <b>readline()</b> function. This provides
426 line-editing and history facilities. Note that <b>libreadline</b> is
427 GPL-licensed, so if you distribute a binary of <b>pcre2test</b> linked in this
428 way, there may be licensing issues. These can be avoided by linking instead
429 with <b>libedit</b>, which has a BSD licence.
430 </P>
431 <P>
432 Setting --enable-pcre2test-libreadline causes the <b>-lreadline</b> option to be
433 added to the <b>pcre2test</b> build. In many operating environments with a
434 sytem-installed readline library this is sufficient. However, in some
435 environments (e.g. if an unmodified distribution version of readline is in
436 use), some extra configuration may be necessary. The INSTALL file for
437 <b>libreadline</b> says this:
438 <pre>
439   "Readline uses the termcap functions, but does not link with
440   the termcap or curses library itself, allowing applications
441   which link with readline the to choose an appropriate library."
442 </pre>
443 If your environment has not been set up so that an appropriate library is
444 automatically included, you may need to add something like
445 <pre>
446   LIBS="-ncurses"
447 </pre>
448 immediately before the <b>configure</b> command.
449 </P>
450 <br><a name="SEC18" href="#TOC1">INCLUDING DEBUGGING CODE</a><br>
451 <P>
452 If you add
453 <pre>
454   --enable-debug
455 </pre>
456 to the <b>configure</b> command, additional debugging code is included in the
457 build. This feature is intended for use by the PCRE2 maintainers.
458 </P>
459 <br><a name="SEC19" href="#TOC1">DEBUGGING WITH VALGRIND SUPPORT</a><br>
460 <P>
461 If you add
462 <pre>
463   --enable-valgrind
464 </pre>
465 to the <b>configure</b> command, PCRE2 will use valgrind annotations to mark
466 certain memory regions as unaddressable. This allows it to detect invalid
467 memory accesses, and is mostly useful for debugging PCRE2 itself.
468 </P>
469 <br><a name="SEC20" href="#TOC1">CODE COVERAGE REPORTING</a><br>
470 <P>
471 If your C compiler is gcc, you can build a version of PCRE2 that can generate a
472 code coverage report for its test suite. To enable this, you must install
473 <b>lcov</b> version 1.6 or above. Then specify
474 <pre>
475   --enable-coverage
476 </pre>
477 to the <b>configure</b> command and build PCRE2 in the usual way.
478 </P>
479 <P>
480 Note that using <b>ccache</b> (a caching C compiler) is incompatible with code
481 coverage reporting. If you have configured <b>ccache</b> to run automatically
482 on your system, you must set the environment variable
483 <pre>
484   CCACHE_DISABLE=1
485 </pre>
486 before running <b>make</b> to build PCRE2, so that <b>ccache</b> is not used.
487 </P>
488 <P>
489 When --enable-coverage is used, the following addition targets are added to the
490 <i>Makefile</i>:
491 <pre>
492   make coverage
493 </pre>
494 This creates a fresh coverage report for the PCRE2 test suite. It is equivalent
495 to running "make coverage-reset", "make coverage-baseline", "make check", and
496 then "make coverage-report".
497 <pre>
498   make coverage-reset
499 </pre>
500 This zeroes the coverage counters, but does nothing else.
501 <pre>
502   make coverage-baseline
503 </pre>
504 This captures baseline coverage information.
505 <pre>
506   make coverage-report
507 </pre>
508 This creates the coverage report.
509 <pre>
510   make coverage-clean-report
511 </pre>
512 This removes the generated coverage report without cleaning the coverage data
513 itself.
514 <pre>
515   make coverage-clean-data
516 </pre>
517 This removes the captured coverage data without removing the coverage files
518 created at compile time (*.gcno).
519 <pre>
520   make coverage-clean
521 </pre>
522 This cleans all coverage data including the generated coverage report. For more
523 information about code coverage, see the <b>gcov</b> and <b>lcov</b>
524 documentation.
525 </P>
526 <br><a name="SEC21" href="#TOC1">SUPPORT FOR FUZZERS</a><br>
527 <P>
528 There is a special option for use by people who want to run fuzzing tests on
529 PCRE2:
530 <pre>
531   --enable-fuzz-support
532 </pre>
533 At present this applies only to the 8-bit library. If set, it causes an extra
534 library called libpcre2-fuzzsupport.a to be built, but not installed. This
535 contains a single function called LLVMFuzzerTestOneInput() whose arguments are
536 a pointer to a string and the length of the string. When called, this function
537 tries to compile the string as a pattern, and if that succeeds, to match it.
538 This is done both with no options and with some random options bits that are
539 generated from the string.
540 </P>
541 <P>
542 Setting --enable-fuzz-support also causes a binary called <b>pcre2fuzzcheck</b>
543 to be created. This is normally run under valgrind or used when PCRE2 is
544 compiled with address sanitizing enabled. It calls the fuzzing function and
545 outputs information about what it is doing. The input strings are specified by
546 arguments: if an argument starts with "=" the rest of it is a literal input
547 string. Otherwise, it is assumed to be a file name, and the contents of the
548 file are the test string.
549 </P>
550 <br><a name="SEC22" href="#TOC1">OBSOLETE OPTION</a><br>
551 <P>
552 In versions of PCRE2 prior to 10.30, there were two ways of handling
553 backtracking in the <b>pcre2_match()</b> function. The default was to use the
554 system stack, but if
555 <pre>
556   --disable-stack-for-recursion
557 </pre>
558 was set, memory on the heap was used. From release 10.30 onwards this has
559 changed (the stack is no longer used) and this option now does nothing except
560 give a warning.
561 </P>
562 <br><a name="SEC23" href="#TOC1">SEE ALSO</a><br>
563 <P>
564 <b>pcre2api</b>(3), <b>pcre2-config</b>(3).
565 </P>
566 <br><a name="SEC24" href="#TOC1">AUTHOR</a><br>
567 <P>
568 Philip Hazel
569 <br>
570 University Computing Service
571 <br>
572 Cambridge, England.
573 <br>
574 </P>
575 <br><a name="SEC25" href="#TOC1">REVISION</a><br>
576 <P>
577 Last updated: 26 April 2018
578 <br>
579 Copyright &copy; 1997-2018 University of Cambridge.
580 <br>
581 <p>
582 Return to the <a href="index.html">PCRE2 index page</a>.
583 </p>