This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[MTASCsft PATCH WIP5 20/33] MT-, AS- and AC-safety docs: manual/pattern.texi
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: libc-alpha at sourceware dot org
- Cc: carlos at redhat dot com, mtk dot manpages at gmail dot com
- Date: Wed, 13 Nov 2013 06:13:59 -0200
- Subject: [MTASCsft PATCH WIP5 20/33] MT-, AS- and AC-safety docs: manual/pattern.texi
- Authentication-results: sourceware.org; auth=none
- References: <20131113081059 dot 3464 dot 51385 dot stgit at frit dot home>
for ChangeLog
* manual/pattern.texi: Document MTASC-safety properties.
---
manual/pattern.texi | 728 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 728 insertions(+)
diff --git a/manual/pattern.texi b/manual/pattern.texi
index afd6480..4066a3a 100644
--- a/manual/pattern.texi
+++ b/manual/pattern.texi
@@ -28,6 +28,38 @@ declared in @file{fnmatch.h}.
@comment fnmatch.h
@comment POSIX.2
@deftypefun int fnmatch (const char *@var{pattern}, const char *@var{string}, int @var{flags})
+@safety{@mtunsafe{envromt, glocale}@asunsafe{asmalloc}@acunsafe{memleak}}
+@c fnmatch envromt, glocale, asmalloc, memleak
+@c strnlen dup ok
+@c mbsrtowcs
+@c memset dup ok
+@c malloc dup asmalloc, memleak
+@c mbsinit dup ok
+@c free dup asmalloc, memleak
+@c FCT = internal_fnwmatch envromt, glocale, asmalloc, memleak
+@c FOLD glocale
+@c towlower glocale
+@c EXT envromt, glocale, asmalloc, memleak
+@c STRLEN = wcslen dup ok
+@c getenv envromt
+@c malloc dup asmalloc, memleak
+@c MEMPCPY = wmempcpy dup ok
+@c FCT dup envromt, glocale, asmalloc, memleak
+@c STRCAT = wcscat dup ok
+@c free dup asmalloc, memleak
+@c END envromt
+@c getenv envromt
+@c MEMCHR = wmemchr dup ok
+@c getenv envromt
+@c IS_CHAR_CLASS = is_char_class glocale
+@c wctype glocale
+@c BTOWC ok
+@c ISWCTYPE ok
+@c auto findidx dup ok
+@c elem_hash dup ok
+@c memcmp dup ok
+@c collseq_table_lookup dup ok
+@c NO_LEADING_PERIOD ok
This function tests whether the string @var{string} matches the pattern
@var{pattern}. It returns @code{0} if they do match; otherwise, it
returns the nonzero value @code{FNM_NOMATCH}. The arguments
@@ -327,6 +359,63 @@ This is a GNU extension.
@comment glob.h
@comment POSIX.2
@deftypefun int glob (const char *@var{pattern}, int @var{flags}, int (*@var{errfunc}) (const char *@var{filename}, int @var{error-code}), glob_t *@var{vector-ptr})
+@safety{@mtunsafe{staticbuf, envromt, tempsig, stimer, glocale}@asunsafe{oncesafe, shlimb, synconsist, asmalloc, selfdeadlock}@acunsafe{incansist, lockleak, fdleak, memleak}}
+@c glob staticbuf, envromt, tempsig, stimer, glocale, oncesafe, shlimb, asynconsist, asmalloc, selfdeadlock, incansist, lockleak, fdleak, memleak
+@c strlen dup ok
+@c strchr dup ok
+@c malloc dup asmalloc, memleak
+@c mempcpy dup ok
+@c next_brace_sub ok
+@c free dup asmalloc, memleak
+@c globfree dup asynconsist, asmalloc, incansist, memleak
+@c glob_pattern_p ok
+@c glob_pattern_type dup ok
+@c getenv dup envromt
+@c GET_LOGIN_NAME_MAX ok
+@c getlogin_r dup staticbuf, tempsig, stimer, glocale, shlimb, asmalloc, selfdeadlock, incansist, lockleak, fdleak, memleak
+@c GETPW_R_SIZE_MAX ok
+@c getpwnam_r dup glocale, oncesafe, shlimb, asmalloc, selfdeadlock, incansist, lockleak, fdleak, memleak
+@c realloc dup asmalloc, memleak
+@c memcpy dup ok
+@c memchr dup ok
+@c *pglob->gl_stat user-supplied
+@c stat64 dup ok
+@c S_ISDIR dup ok
+@c strdup dup asmalloc, memleak
+@c glob_pattern_type ok
+@c glob_in_dir envromt, glocale, asynconsist, asmalloc, incansist, fdleak, memleak
+@c strlen dup ok
+@c glob_pattern_type dup ok
+@c malloc dup asmalloc, memleak
+@c mempcpy dup ok
+@c *pglob->gl_stat user-supplied
+@c stat64 dup ok
+@c free dup asmalloc, memleak
+@c *pglob->gl_opendir user-supplied
+@c opendir dup asmalloc, memleak, fdleak
+@c dirfd dup ok
+@c *pglob->gl_readdir user-supplied
+@c CONVERT_DIRENT_DIRENT64 ok
+@c readdir64 ok [protected by exclusive use of the stream]
+@c REAL_DIR_ENTRY ok
+@c DIRENT_MIGHT_BE_DIR ok
+@c fnmatch dup envromt, glocale, asmalloc, memleak
+@c DIRENT_MIGHT_BE_SYMLINK ok
+@c link_exists_p ok
+@c link_exists2_p ok
+@c strlen dup ok
+@c mempcpy dup ok
+@c *pglob->gl_stat user-supplied
+@c fxstatat64 dup ok
+@c realloc dup asmalloc, memleak
+@c pglob->gl_closedir user-supplied
+@c closedir asmalloc, memleak, fdleak
+@c prefix_array dup asynconsist, asmalloc, incansist, memleak
+@c strlen dup ok
+@c malloc dup asmalloc, memleak
+@c free dup asmalloc, memleak
+@c mempcpy dup ok
+@c strcpy dup ok
The function @code{glob} does globbing using the pattern @var{pattern}
in the current directory. It puts the result in a newly allocated
vector, and stores the size and address of this vector into
@@ -398,6 +487,8 @@ is encountered @code{glob} @emph{can} fail.
@comment glob.h
@comment GNU
@deftypefun int glob64 (const char *@var{pattern}, int @var{flags}, int (*@var{errfunc}) (const char *@var{filename}, int @var{error-code}), glob64_t *@var{vector-ptr})
+@safety{@mtunsafe{staticbuf, envromt, tempsig, stimer, glocale}@asunsafe{oncesafe, shlimb, synconsist, asmalloc, selfdeadlock}@acunsafe{incansist, lockleak, fdleak, memleak}}
+@c Same code as glob, but with glob64_t #defined as glob_t.
The @code{glob64} function was added as part of the Large File Summit
extensions but is not part of the original LFS proposal. The reason for
this is simple: it is not necessary. The necessity for a @code{glob64}
@@ -662,6 +753,9 @@ the time when all @code{glob} calls are done.
@comment glob.h
@comment POSIX.2
@deftypefun void globfree (glob_t *@var{pglob})
+@safety{@mtsafe{}@asunsafe{asynconsist, asmalloc}@acunsafe{incansist, memleak}}
+@c globfree dup asynconsist, asmalloc, incansist, memleak
+@c free dup asmalloc, memleak
The @code{globfree} function frees all resources allocated by previous
calls to @code{glob} associated with the object pointed to by
@var{pglob}. This function should be called whenever the currently used
@@ -671,6 +765,7 @@ calls to @code{glob} associated with the object pointed to by
@comment glob.h
@comment GNU
@deftypefun void globfree64 (glob64_t *@var{pglob})
+@safety{@mtsafe{}@asunsafe{asynconsist, selfdeadlock}@acunsafe{incansist, lockleak, fdleak, memleak}}
This function is equivalent to @code{globfree} but it frees records of
type @code{glob64_t} which were allocated by @code{glob64}.
@end deftypefun
@@ -733,6 +828,251 @@ expression into it by calling @code{regcomp}.
@comment regex.h
@comment POSIX.2
@deftypefun int regcomp (regex_t *restrict @var{compiled}, const char *restrict @var{pattern}, int @var{cflags})
+@safety{@mtsafe{glocale}@asunsafe{asynconsist, asmalloc, selfdeadlock, shlimb}@acunsafe{incansist, lockleak, memleak, fdleak, shlimb}}
+@c All of the issues have to do with memory allocation and multi-byte
+@c character handling present in the input string, or implied by ranges
+@c or inverted character classes.
+@c (re_)malloc asmalloc, memleak
+@c re_compile_internal glocale, asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c (re_)realloc asmalloc, memleak (asynconsist, incansist, for other
+@c callers that don't zero the buffer)
+@c init_dfa glocale, asynconsist, asmalloc, sefldeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c (re_)malloc asmalloc, memleak
+@c calloc asmalloc, memleak
+@c _NL_CURRENT ok
+@c _NL_CURRENT_WORD ok
+@c btowc asynconsist, asmalloc, sefldeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c libc_lock_init ok
+@c re_string_construct glocale, asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c re_string_construct_common ok
+@c re_string_realloc_buffers asmalloc, memleak
+@c (re_)realloc dup asmalloc, memleak
+@c build_wcs_upper_buffer glocale, asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c isascii ok
+@c mbsinit ok
+@c toupper ok
+@c mbrtowc dup asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c iswlower glocale
+@c towupper glocale
+@c wcrtomb dup asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c (re_)malloc dup asmalloc, memleak
+@c build_upper_buffer ok (glocale, but optimized)
+@c islower ok
+@c toupper ok
+@c build_wcs_buffer asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c mbrtowc dup asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c re_string_translate_buffer ok
+@c parse (maybe glocale), asynconsist, asmalloc, sefldeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c fetch_token (maybe glocale), asynconsist, asmalloc, sefldeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c peek_token ok (maybe glocale)
+@c re_string_eoi ok
+@c re_string_peek_byte ok
+@c re_string_cur_idx ok
+@c re_string_length ok
+@c re_string_peek_byte_case ok (maybe glocale)
+@c re_string_peek_byte dup ok
+@c re_string_is_single_byte_char ok
+@c isascii ok
+@c re_string_peek_byte dup ok
+@c re_string_wchar_at ok
+@c re_string_skip_bytes ok
+@c re_string_skip_bytes dup ok
+@c parse_reg_exp (maybe glocale), asynconsist, asmalloc, sefldeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c parse_branch (maybe glocale), asynconsist, asmalloc, sefldeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c parse_expression (maybe glocale), asynconsist, asmalloc, sefldeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c create_token_tree dup asmalloc, memleak
+@c re_string_eoi dup ok
+@c re_string_first_byte ok
+@c fetch_token dup (maybe glocale), asynconsist, asmalloc, sefldeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c create_tree dup asmalloc, memleak
+@c parse_sub_exp (maybe glocale), asynconsist, asmalloc, sefldeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c fetch_token dup (maybe glocale), asynconsist, asmalloc, sefldeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c parse_reg_exp dup (maybe glocale), asynconsist, asmalloc, sefldeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c postorder() asmalloc, memleak
+@c free_tree asmalloc, memleak
+@c free_token dup asmalloc, memleak
+@c create_tree dup asmalloc, memleak
+@c parse_bracket_exp (maybe glocale), asynconsist, asmalloc, sefldeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c _NL_CURRENT dup ok
+@c _NL_CURRENT_WORD dup ok
+@c calloc dup asmalloc, memleak
+@c (re_)free dup asmalloc, memleak
+@c peek_token_bracket ok
+@c re_string_eoi dup ok
+@c re_string_peek_byte dup ok
+@c re_string_first_byte dup ok
+@c re_string_cur_idx dup ok
+@c re_string_length dup ok
+@c re_string_skip_bytes dup ok
+@c bitset_set ok
+@c re_string_skip_bytes ok
+@c parse_bracket_element ok (maybe glocale)
+@c re_string_char_size_at ok
+@c re_string_wchar_at dup ok
+@c re_string_skip_bytes dup ok
+@c parse_bracket_symbol ok (maybe glocale)
+@c re_string_eoi dup ok
+@c re_string_fetch_byte_case ok (maybe glocale)
+@c re_string_fetch_byte ok
+@c re_string_first_byte dup ok
+@c isascii ok
+@c re_string_char_size_at dup ok
+@c re_string_skip_bytes dup ok
+@c re_string_fetch_byte dup ok
+@c re_string_peek_byte dup ok
+@c re_string_skip_bytes dup ok
+@c peek_token_bracket dup ok
+@c auto build_range_exp asynconsist, asmalloc, sefldeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c auto lookup_collation_sequence_value asynconsist, asmalloc, sefldeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c btowc dup asynconsist, asmalloc, sefldeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c collseq_table_lookup ok
+@c auto seek_collating_symbol_entry dup ok
+@c (re_)realloc dup asmalloc, memleak
+@c collseq_table_lookup dup ok
+@c bitset_set dup ok
+@c (re_)realloc dup asmalloc, memleak
+@c build_equiv_class (maybe glocale), asmalloc, memleak
+@c _NL_CURRENT ok
+@c auto findidx ok
+@c bitset_set dup ok
+@c (re_)realloc dup asmalloc, memleak
+@c auto build_collating_symbol asmalloc, memleak
+@c auto seek_collating_symbol_entry ok
+@c bitset_set dup ok
+@c (re_)realloc dup asmalloc, memleak
+@c build_charclass (maybe glocale), asmalloc, memleak
+@c (re_)realloc dup asmalloc, memleak
+@c bitset_set dup ok
+@c isalnum ok
+@c iscntrl ok
+@c isspace ok
+@c isalpha ok
+@c isdigit ok
+@c isprint ok
+@c isupper ok
+@c isblank ok
+@c isgraph ok
+@c ispunct ok
+@c isxdigit ok
+@c bitset_not ok
+@c bitset_mask ok
+@c create_token_tree dup asmalloc, memleak
+@c create_tree dup asmalloc, memleak
+@c free_charset dup asmalloc, memleak
+@c init_word_char (maybe glocale)
+@c isalnum ok
+@c build_charclass_op (maybe glocale), asmalloc, memleak
+@c calloc dup asmalloc, memleak
+@c build_charclass dup (maybe glocale), asmalloc, memleak
+@c (re_)free dup asmalloc, memleak
+@c free_charset dup asmalloc, memleak
+@c bitset_set dup ok
+@c bitset_not dup ok
+@c bitset_mask dup ok
+@c create_token_tree dup asmalloc, memleak
+@c create_tree dup asmalloc, memleak
+@c parse_dup_op (maybe glocale), asynconsist, asmalloc, sefldeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c re_string_cur_idx dup ok
+@c fetch_number ok (maybe glocale), asynconsist, asmalloc, sefldeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c fetch_token dup (maybe glocale), asynconsist, asmalloc, sefldeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c re_string_set_index ok
+@c postorder() asmalloc, memleak
+@c free_tree dup asmalloc, memleak
+@c mark_opt_subexp ok
+@c duplicate_tree asmalloc, memleak
+@c create_token_tree dup asmalloc, memleak
+@c create_tree dup asmalloc, memleak
+@c postorder() asmalloc, memleak
+@c free_tree dup asmalloc, memleak
+@c fetch_token dup (maybe glocale), asynconsist, asmalloc, sefldeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c parse_branch dup (maybe glocale), asynconsist, asmalloc, sefldeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c create_tree dup asmalloc, memleak
+@c create_tree asmalloc, memleak
+@c create_token_tree asmalloc, memleak
+@c (re_)malloc dup asmalloc, memleak
+@c analyze asmalloc, memleak
+@c (re_)malloc dup asmalloc, memleak
+@c preorder() asmalloc, memleak
+@c optimize_subexps ok
+@c calc_next ok
+@c link_nfa_nodes asmalloc, memleak
+@c re_node_set_init_1 asmalloc, memleak
+@c (re_)malloc dup asmalloc, memleak
+@c re_node_set_init_2 asmalloc, memleak
+@c (re_)malloc dup asmalloc, memleak
+@c postorder() asmalloc, memleak
+@c lower_subexps asmalloc, memleak
+@c lower_subexp asmalloc, memleak
+@c create_tree dup asmalloc, memleak
+@c calc_first asmalloc, memleak
+@c re_dfa_add_node asmalloc, memleak
+@c (re_)realloc dup asmalloc, memleak
+@c re_node_set_init_empty ok
+@c calc_eclosure asmalloc, memleak
+@c calc_eclosure_iter asmalloc, memleak
+@c re_node_set_alloc asmalloc, memleak
+@c (re_)malloc dup asmalloc, memleak
+@c duplicate_node_closure asmalloc, memleak
+@c re_node_set_empty ok
+@c duplicate_node asmalloc, memleak
+@c re_dfa_add_node dup asmalloc, memleak
+@c re_node_set_insert asmalloc, memleak
+@c (re_)realloc dup asmalloc, memleak
+@c search_duplicated_node ok
+@c re_node_set_merge asmalloc, memleak
+@c (re_)realloc dup asmalloc, memleak
+@c re_node_set_free asmalloc, memleak
+@c (re_)free dup asmalloc, memleak
+@c re_node_set_insert dup asmalloc, memleak
+@c re_node_set_free dup asmalloc, memleak
+@c calc_inveclosure asmalloc, memleak
+@c re_node_set_init_empty dup ok
+@c re_node_set_insert_last asmalloc, memleak
+@c (re_)realloc dup asmalloc, memleak
+@c optimize_utf8 ok
+@c create_initial_state asmalloc, memleak
+@c re_node_set_init_copy asmalloc, memleak
+@c (re_)malloc dup asmalloc, memleak
+@c re_node_set_init_empty dup ok
+@c re_node_set_contains ok
+@c re_node_set_merge dup asmalloc, memleak
+@c re_acquire_state_context asmalloc, memleak
+@c calc_state_hash ok
+@c re_node_set_compare ok
+@c create_cd_newstate asmalloc, memleak
+@c calloc dup asmalloc, memleak
+@c re_node_set_init_copy dup asmalloc, memleak
+@c (re_)free dup asmalloc, memleak
+@c free_state asmalloc, memleak
+@c re_node_set_free dup asmalloc, memleak
+@c (re_)free dup asmalloc, memleak
+@c NOT_SATISFY_PREV_CONSTRAINT ok
+@c re_node_set_remove_at ok
+@c register_state asmalloc, memleak
+@c re_node_set_alloc dup asmalloc, memleak
+@c re_node_set_insert_last dup asmalloc, memleak
+@c (re_)realloc dup asmalloc, memleak
+@c re_node_set_free dup asmalloc, memleak
+@c free_workarea_compile asmalloc, memleak
+@c (re_)free dup asmalloc, memleak
+@c re_string_destruct asmalloc, memleak
+@c (re_)free dup asmalloc, memleak
+@c free_dfa_content asmalloc, memleak
+@c free_token asmalloc, memleak
+@c free_charset asmalloc, memleak
+@c (re_)free dup asmalloc, memleak
+@c (re_)free dup asmalloc, memleak
+@c (re_)free dup asmalloc, memleak
+@c re_node_set_free dup asmalloc, memleak
+@c re_compile_fastmap glocale, asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c re_compile_fastmap_iter glocale, asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c re_set_fastmap ok
+@c tolower ok
+@c mbrtowc dup asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c wcrtomb dup asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c towlower glocale
+@c _NL_CURRENT ok
+@c (re_)free asmalloc, memleak
The function @code{regcomp} ``compiles'' a regular expression into a
data structure that you can use with @code{regexec} to match against a
string. The compiled regular expression format is designed for
@@ -882,6 +1222,247 @@ unless the regular expression contains anchor characters (@samp{^} or
@comment regex.h
@comment POSIX.2
@deftypefun int regexec (const regex_t *restrict @var{compiled}, const char *restrict @var{string}, size_t @var{nmatch}, regmatch_t @var{matchptr}[restrict], int @var{eflags})
+@safety{@mtsafe{glocale}@asunsafe{asynconsist, asmalloc, selfdeadlock, shlimb}@acunsafe{incansist, lockleak, memleak, fdleak, shlimb}}
+@c libc_lock_lock selfdeadlock, lockleak
+@c re_search_internal glocale, asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c re_string_allocate asmalloc, memleak
+@c re_string_construct_common dup ok
+@c re_string_realloc_buffers dup asmalloc, memleak
+@c match_ctx_init asmalloc, memleak
+@c (re_)malloc dup asmalloc, memleak
+@c re_string_byte_at ok
+@c re_string_first_byte dup ok
+@c check_matching glocale, asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c re_string_cur_idx dup ok
+@c acquire_init_state_context dup asmalloc, memleak
+@c re_string_context_at ok
+@c re_string_byte_at dup ok
+@c bitset_contain ok
+@c re_acquire_state_context dup asmalloc, memleak
+@c check_subexp_matching_top asmalloc, memleak
+@c match_ctx_add_subtop asmalloc, memleak
+@c (re_)realloc dup asmalloc, memleak
+@c calloc dup asmalloc, memleak
+@c transit_state_bkref glocale, asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c re_string_cur_idx dup ok
+@c re_string_context_at dup ok
+@c NOT_SATISFY_NEXT_CONSTRAINT ok
+@c get_subexp glocale, asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c re_string_get_buffer ok
+@c search_cur_bkref_entry ok
+@c clean_state_log_if_needed glocale, asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c extend_buffers glocale, asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c re_string_realloc_buffers dup asmalloc, memleak
+@c (re_)realloc dup asmalloc, memleak
+@c build_wcs_upper_buffer dup glocale, asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c build_upper_buffer dup ok (glocale, but optimized)
+@c build_wcs_buffer dup asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c re_string_translate_buffer dup ok
+@c get_subexp_sub glocale, asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c check_arrival glocale, asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c (re_)realloc dup asmalloc, memleak
+@c re_string_context_at dup ok
+@c re_node_set_init_1 dup asmalloc, memleak
+@c check_arrival_expand_ecl asmalloc, memleak
+@c re_node_set_alloc dup asmalloc, memleak
+@c find_subexp_node ok
+@c re_node_set_merge dup asmalloc, memleak
+@c re_node_set_free dup asmalloc, memleak
+@c check_arrival_expand_ecl_sub asmalloc, memleak
+@c re_node_set_contains dup ok
+@c re_node_set_insert dup asmalloc, memleak
+@c re_node_set_free dup asmalloc, memleak
+@c re_node_set_init_copy dup asmalloc, memleak
+@c re_node_set_init_empty dup ok
+@c expand_bkref_cache asmalloc, memleak
+@c search_cur_bkref_entry dup ok
+@c re_node_set_contains dup ok
+@c re_node_set_init_1 dup asmalloc, memleak
+@c check_arrival_expand_ecl dup asmalloc, memleak
+@c re_node_set_merge dup asmalloc, memleak
+@c re_node_set_init_copy dup asmalloc, memleak
+@c re_node_set_insert dup asmalloc, memleak
+@c re_node_set_free dup asmalloc, memleak
+@c re_acquire_state asmalloc, memleak
+@c calc_state_hash dup ok
+@c re_node_set_compare dup ok
+@c create_ci_newstate asmalloc, memleak
+@c calloc dup asmalloc, memleak
+@c re_node_set_init_copy dup asmalloc, memleak
+@c (re_)free dup asmalloc, memleak
+@c register_state dup asmalloc, memleak
+@c free_state dup asmalloc, memleak
+@c re_acquire_state_context dup asmalloc, memleak
+@c re_node_set_merge dup asmalloc, memleak
+@c check_arrival_add_next_nodes glocale, asmalloc, memleak
+@c re_node_set_init_empty dup ok
+@c check_node_accept_bytes glocale, asmalloc, memleak
+@c re_string_byte_at dup ok
+@c re_string_char_size_at dup ok
+@c re_string_elem_size_at (maybe glocale)
+@c _NL_CURRENT_WORD dup ok
+@c _NL_CURRENT dup ok
+@c auto findidx dup ok
+@c _NL_CURRENT_WORD dup ok
+@c _NL_CURRENT dup ok
+@c collseq_table_lookup dup ok
+@c find_collation_sequence_value (maybe glocale)
+@c _NL_CURRENT_WORD dup ok
+@c _NL_CURRENT dup ok
+@c auto findidx dup ok
+@c wcscoll glocale, asmalloc, memleak
+@c re_node_set_empty dup ok
+@c re_node_set_merge dup asmalloc, memleak
+@c re_node_set_free dup asmalloc, memleak
+@c re_node_set_insert dup asmalloc, memleak
+@c re_acquire_state dup asmalloc, memleak
+@c check_node_accept ok
+@c re_string_byte_at dup ok
+@c bitset_contain dup ok
+@c re_string_context_at dup ok
+@c NOT_SATISFY_NEXT_CONSTRAINT dup ok
+@c match_ctx_add_entry asmalloc, memleak
+@c (re_)realloc dup asmalloc, memleak
+@c (re_)free dup asmalloc, memleak
+@c clean_state_log_if_needed dup glocale, asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c extend_buffers dup glocale, asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c find_subexp_node dup ok
+@c calloc dup asmalloc, memleak
+@c check_arrival dup ***
+@c match_ctx_add_sublast asmalloc, memleak
+@c (re_)realloc dup asmalloc, memleak
+@c re_acquire_state_context dup asmalloc, memleak
+@c re_node_set_init_union asmalloc, memleak
+@c (re_)malloc dup asmalloc, memleak
+@c re_node_set_init_copy dup asmalloc, memleak
+@c re_node_set_init_empty dup ok
+@c re_node_set_free dup asmalloc, memleak
+@c check_subexp_matching_top dup asmalloc, memleak
+@c check_halt_state_context ok
+@c re_string_context_at dup ok
+@c check_halt_node_context ok
+@c NOT_SATISFY_NEXT_CONSTRAINT dup ok
+@c re_string_eoi dup ok
+@c extend_buffers dup glocale, asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c transit_state glocale, asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c transit_state_mb glocale, asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c re_string_context_at dup ok
+@c NOT_SATISFY_NEXT_CONSTRAINT dup ok
+@c check_node_accept_bytes dup glocale, asmalloc, memleak
+@c re_string_cur_idx dup ok
+@c clean_state_log_if_needed glocale, asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c re_node_set_init_union dup asmalloc, memleak
+@c re_acquire_state_context dup asmalloc, memleak
+@c re_string_fetch_byte dup ok
+@c re_string_context_at dup ok
+@c build_trtable asmalloc, memleak
+@c (re_)malloc dup asmalloc, memleak
+@c group_nodes_into_DFAstates asmalloc, memleak
+@c bitset_empty dup ok
+@c bitset_set dup ok
+@c bitset_merge dup ok
+@c bitset_set_all ok
+@c bitset_clear ok
+@c bitset_contain dup ok
+@c bitset_copy ok
+@c re_node_set_init_copy dup asmalloc, memleak
+@c re_node_set_insert dup asmalloc, memleak
+@c re_node_set_init_1 dup asmalloc, memleak
+@c re_node_set_free dup asmalloc, memleak
+@c re_node_set_alloc dup asmalloc, memleak
+@c malloc dup asmalloc, memleak
+@c free dup asmalloc, memleak
+@c re_node_set_free dup asmalloc, memleak
+@c bitset_empty ok
+@c re_node_set_empty dup ok
+@c re_node_set_merge dup asmalloc, memleak
+@c re_acquire_state_context dup asmalloc, memleak
+@c bitset_merge ok
+@c calloc dup asmalloc, memleak
+@c bitset_contain dup ok
+@c merge_state_with_log glocale, asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c re_string_cur_idx dup ok
+@c re_node_set_init_union dup asmalloc, memleak
+@c re_string_context_at dup ok
+@c re_node_set_free dup asmalloc, memleak
+@c check_subexp_matching_top asmalloc, memleak
+@c match_ctx_add_subtop dup asmalloc, memleak
+@c transit_state_bkref dup glocale, asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c find_recover_state
+@c re_string_cur_idx dup ok
+@c re_string_skip_bytes dup ok
+@c merge_state_with_log dup glocale, asynconsist, asmalloc, selfdeadlock, shlimb, incansist, lockleak, memleak, fdleak
+@c check_halt_state_context dup ok
+@c prune_impossible_nodes glocale, asmalloc, memleak
+@c (re_)malloc dup asmalloc, memleak
+@c sift_ctx_init ok
+@c re_node_set_init_empty dup ok
+@c sift_states_backward glocale, asmalloc, memleak
+@c re_node_set_init_1 dup asmalloc, memleak
+@c update_cur_sifted_state glocale, asmalloc, memleak
+@c add_epsilon_src_nodes asmalloc, memleak
+@c re_acquire_state dup asmalloc, memleak
+@c re_node_set_alloc dup asmalloc, memleak
+@c re_node_set_merge dup asmalloc, memleak
+@c re_node_set_add_intersect asmalloc, memleak
+@c (re_)realloc dup asmalloc, memleak
+@c check_subexp_limits asmalloc, memleak
+@c sub_epsilon_src_nodes asmalloc, memleak
+@c re_node_set_init_empty dup ok
+@c re_node_set_contains dup ok
+@c re_node_set_add_intersect dup asmalloc, memleak
+@c re_node_set_free dup asmalloc, memleak
+@c re_node_set_remove_at dup ok
+@c re_node_set_contains dup ok
+@c re_acquire_state dup asmalloc, memleak
+@c sift_states_bkref glocale, asmalloc, memleak
+@c search_cur_bkref_entry dup ok
+@c check_dst_limits ok
+@c search_cur_bkref_entry dup ok
+@c check_dst_limits_calc_pos ok
+@c check_dst_limits_calc_pos_1 ok
+@c re_node_set_init_copy dup asmalloc, memleak
+@c re_node_set_insert dup asmalloc, memleak
+@c sift_states_backward dup glocale, asmalloc, memleak
+@c merge_state_array dup asmalloc, memleak
+@c re_node_set_remove ok
+@c re_node_set_contains dup ok
+@c re_node_set_remove_at dup ok
+@c re_node_set_free dup asmalloc, memleak
+@c re_node_set_free dup asmalloc, memleak
+@c re_node_set_empty dup ok
+@c build_sifted_states glocale, asmalloc, memleak
+@c sift_states_iter_mb glocale, asmalloc, memleak
+@c check_node_accept_bytes dup glocale, asmalloc, memleak
+@c check_node_accept dup ok
+@c check_dst_limits dup ok
+@c re_node_set_insert dup asmalloc, memleak
+@c re_node_set_free dup asmalloc, memleak
+@c check_halt_state_context dup ok
+@c merge_state_array asmalloc, memleak
+@c re_node_set_init_union dup asmalloc, memleak
+@c re_acquire_state dup asmalloc, memleak
+@c re_node_set_free dup asmalloc, memleak
+@c (re_)free dup asmalloc, memleak
+@c set_regs asmalloc, memleak
+@c (re_)malloc dup asmalloc, memleak
+@c re_node_set_init_empty dup ok
+@c free_fail_stack_return asmalloc, memleak
+@c re_node_set_free dup asmalloc, memleak
+@c (re_)free dup asmalloc, memleak
+@c update_regs ok
+@c re_node_set_free dup asmalloc, memleak
+@c pop_fail_stack asmalloc, memleak
+@c re_node_set_free dup asmalloc, memleak
+@c (re_)free dup asmalloc, memleak
+@c (re_)free dup asmalloc, memleak
+@c (re_)free dup asmalloc, memleak
+@c match_ctx_free asmalloc, memleak
+@c match_ctx_clean asmalloc, memleak
+@c (re_)free dup asmalloc, memleak
+@c (re_)free dup asmalloc, memleak
+@c re_string_destruct dup asmalloc, memleak
+@c libc_lock_unlock lockleak
This function tries to match the compiled regular expression
@code{*@var{compiled}} against @var{string}.
@@ -1044,6 +1625,9 @@ free the storage it uses by calling @code{regfree}.
@comment regex.h
@comment POSIX.2
@deftypefun void regfree (regex_t *@var{compiled})
+@safety{@mtsafe{}@asunsafe{asmalloc}@acunsafe{memleak}}
+@c (re_)free dup asmalloc, memleak
+@c free_dfa_content dup asmalloc, memleak
Calling @code{regfree} frees all the storage that @code{*@var{compiled}}
points to. This includes various internal fields of the @code{regex_t}
structure that aren't documented in this manual.
@@ -1061,6 +1645,8 @@ the function @code{regerror} to turn it into an error message string.
@comment regex.h
@comment POSIX.2
@deftypefun size_t regerror (int @var{errcode}, const regex_t *restrict @var{compiled}, char *restrict @var{buffer}, size_t @var{length})
+@safety{@mtunsafe{envromt}@asunsafe{asynconsist, asmalloc, selfdeadlock, shlimb}@acunsafe{incansist, lockleak, fdleak, memleak, shlimb}}
+@c regerror calls gettext, strcmp and mempcpy or memcpy.
This function produces an error message string for the error code
@var{errcode}, and stores the string in @var{length} bytes of memory
starting at @var{buffer}. For the @var{compiled} argument, supply the
@@ -1226,6 +1812,145 @@ the beginning of the vector.
@comment wordexp.h
@comment POSIX.2
@deftypefun int wordexp (const char *@var{words}, wordexp_t *@var{word-vector-ptr}, int @var{flags})
+@safety{@mtunsafe{staticbuf, envromt, tempsig, stimer, glocale, uplugin, oncesafe, shlimb}@asunsafe{asi18n, asmalloc, asynconsist, selfdeadlock}@acunsafe{incansist, lockleak, fdleak, memleak}}
+@c wordexp staticbuf, envromt, tempsig, stimer, glocale, uplugin, oncesafe, shlimb, asi18n, asmalloc, asynconsist, selfdeadlock, incansist, lockleak, fdleak, memleak
+@c w_newword ok
+@c wordfree dup asynconsist, asmalloc, incansist, memleak
+@c calloc dup asmalloc, memleak
+@c getenv dup envromt
+@c strcpy dup ok
+@c parse_backslash asmalloc, memleak
+@c w_addchar dup asmalloc, memleak
+@c parse_dollars glocale, uplugin, envromt, oncesafe, shlimb, asi18n, asmalloc, selfdeadlock, incansist, lockleak, fdleak, memleak
+@c w_addchar dup asmalloc, memleak
+@c parse_arith glocale, uplugin, envromt, oncesafe, shlimb, asi18n, asmalloc, selfdeadlock, incansist, lockleak, fdleak, memleak
+@c w_newword dup ok
+@c parse_dollars dup glocale, uplugin, envromt, oncesafe, shlimb, asi18n, asmalloc, selfdeadlock, incansist, lockleak, fdleak, memleak
+@c parse_backtick dup uplugin, asmalloc, lockleak, fdleak, memleak
+@c parse_qtd_backslash dup asmalloc, memleak
+@c eval_expr glocale
+@c eval_expr_multidiv glocale
+@c eval_expr_val glocale^
+@c isspace dup glocale^^
+@c eval_expr dup glocale
+@c isspace dup glocale^^
+@c isspace dup glocale^^
+@c free dup asmalloc, memleak
+@c w_addchar dup asmalloc, memleak
+@c w_addstr dup asmalloc, memleak
+@c itoa_word dup ok
+@c parse_comm uplugin, asmalloc, lockleak, fdleak, memleak
+@c w_newword dup ok
+@c pthread_setcancelstate uplugin, asmalloc, memleak
+@c (disable cancellation around exec_comm; it may do_cancel the
+@c second time, if async cancel is enabled)
+@c THREAD_ATOMIC_CMPXCHG_VAL dup ok
+@c CANCEL_ENABLED_AND_CANCELED_AND_ASYNCHRONOUS dup ok
+@c do_cancel uplugin, asmalloc, memleak
+@c THREAD_ATOMIC_BIT_SET dup ok
+@c pthread_unwind uplugin, asmalloc, memleak
+@c Unwind_ForcedUnwind if available uplugin, asmalloc, memleak
+@c libc_unwind_longjmp otherwise
+@c cleanups
+@c exec_comm uplugin, asmalloc, lockleak, fdleak, memleak
+@c pipe2 dup ok
+@c pipe dup ok
+@c fork dup uplugin, lockleak
+@c close dup fdleak
+@c on child: exec_comm_child -> exec or abort
+@c waitpid dup ok
+@c read dup ok
+@c w_addmem dup asmalloc, memleak
+@c strchr dup ok
+@c w_addword dup asmalloc, memleak
+@c w_newword dup ok
+@c w_addchar dup asmalloc, memleak
+@c free dup asmalloc, memleak
+@c kill dup ok
+@c free dup asmalloc, memleak
+@c parse_param glocale, uplugin, envromt, oncesafe, shlimb, asi18n, asmalloc, selfdeadlock, incansist, lockleak, fdleak, memleak
+@c reads from __libc_argc and __libc_argv without guards
+@c w_newword dup ok
+@c isalpha dup glocale^^
+@c w_addchar dup asmalloc, memleak
+@c isalnum dup glocale^^
+@c isdigit dup glocale^^
+@c strchr dup ok
+@c itoa_word dup ok
+@c atoi dup glocale
+@c getpid dup selfdeadlock(hurd)
+@c w_addstr dup asmalloc, memleak
+@c free dup asmalloc, memleak
+@c strlen dup ok
+@c malloc dup asmalloc, memleak
+@c stpcpy dup ok
+@c w_addword dup asmalloc, memleak
+@c strdup dup asmalloc, memleak
+@c getenv dup envromt
+@c parse_dollars dup glocale, uplugin, envromt, oncesafe, shlimb, asi18n, asmalloc, selfdeadlock, incansist, lockleak, fdleak, memleak
+@c parse_tilde dup glocale, uplugin, envromt, oncesafe, shlimb, asmalloc, selfdeadlock, incansist, lockleak, fdleak, memleak
+@c fnmatch dup envromt, glocale, asmalloc, memleak
+@c mempcpy dup ok
+@c _ dup asi18n
+@c fxprintf dup lockleak
+@c setenv dup asmalloc, selfdeadlock, incansist, lockleak, memleak
+@c strspn dup ok
+@c strcspn dup ok
+@c parse_backtick uplugin, asmalloc, lockleak, fdleak, memleak
+@c w_newword dup ok
+@c exec_comm dup uplugin, asmalloc, lockleak, fdleak, memleak
+@c free dup asmalloc, memleak
+@c parse_qtd_backslash dup asmalloc, memleak
+@c parse_backslash dup asmalloc, memleak
+@c w_addchar dup asmalloc, memleak
+@c parse_dquote glocale, uplugin, envromt, oncesafe, shlimb, asi18n, asmalloc, selfdeadlock, incansist, lockleak, fdleak, memleak
+@c parse_dollars dup glocale, uplugin, envromt, oncesafe, shlimb, asi18n, asmalloc, selfdeadlock, incansist, lockleak, fdleak, memleak
+@c parse_backtick dup uplugin, asmalloc, lockleak, fdleak, memleak
+@c parse_qtd_backslash dup asmalloc, memleak
+@c w_addchar dup asmalloc, memleak
+@c w_addword dup asmalloc, memleak
+@c strdup dup asmalloc, memleak
+@c realloc dup asmalloc, memleak
+@c free dup asmalloc, memleak
+@c parse_squote dup asmalloc, memleak
+@c w_addchar dup asmalloc, memleak
+@c parse_tilde glocale, envromt, oncesafe, shlimb, asmalloc, selfdeadlock, incansist, lockleak, fdleak, memleak
+@c strchr dup ok
+@c w_addchar dup asmalloc, memleak
+@c getenv dup envromt
+@c w_addstr dup asmalloc, memleak
+@c strlen dup ok
+@c w_addmem dup asmalloc, memleak
+@c realloc dup asmalloc, memleak
+@c free dup asmalloc, memleak
+@c mempcpy dup ok
+@c getuid dup selfdeadlock(hurd)
+@c getpwuid_r dup glocale, oncesafe, shlimb, asmalloc, selfdeadlock, incansist, lockleak, fdleak, memleak
+@c getpwnam_r dup glocale, oncesafe, shlimb, asmalloc, selfdeadlock, incansist, lockleak, fdleak, memleak
+@c parse_glob staticbuf, envromt, tempsig, stimer, glocale, uplugin, oncesafe, shlimb, asi18n, asmalloc, selfdeadlock, incansist, lockleak, fdleak, memleak
+@c strchr dup ok
+@c parse_dollars dup glocale, uplugin, envromt, oncesafe, shlimb, asi18n, asmalloc, selfdeadlock, incansist, lockleak, fdleak, memleak
+@c parse_qtd_backslash asmalloc, memleak
+@c w_addchar dup asmalloc, memleak
+@c parse_backslash dup asmalloc, memleak
+@c w_addchar dup asmalloc, memleak
+@c w_addword dup asmalloc, memleak
+@c w_newword dup ok
+@c do_parse_glob staticbuf, envromt, tempsig, stimer, glocale, oncesafe, shlimb, asmalloc, selfdeadlock, lockleak, fdleak, memleak
+@c glob dup staticbuf, envromt, tempsig, stimer, glocale, oncesafe, shlimb, asmalloc, selfdeadlock, lockleak, fdleak, memleak [auto glob_t avoids asynconsist, incansist]
+@c w_addstr dup asmalloc, memleak
+@c w_addchar dup asmalloc, memleak
+@c globfree dup asmalloc, memleak [auto glob_t avoids asynconsist, incansist]
+@c free dup asmalloc, memleak
+@c w_newword dup ok
+@c strdup dup asmalloc, memleak
+@c w_addword dup asmalloc, memleak
+@c wordfree dup asynconsist, asmalloc, incansist, memleak
+@c strchr dup ok
+@c w_addchar dup asmalloc, memleak
+@c realloc dup asmalloc, memleak
+@c free dup asmalloc, memleak
+@c free dup asmalloc, memleak
Perform word expansion on the string @var{words}, putting the result in
a newly allocated vector, and store the size and address of this vector
into @code{*@var{word-vector-ptr}}. The argument @var{flags} is a
@@ -1289,6 +2014,9 @@ quoting character is a syntax error.
@comment wordexp.h
@comment POSIX.2
@deftypefun void wordfree (wordexp_t *@var{word-vector-ptr})
+@safety{@mtsafe{}@asunsafe{asynconsist, asmalloc}@acunsafe{incansist, memleak}}
+@c wordfree dup asynconsist, asmalloc, incansist, memleak
+@c free dup asmalloc, memleak
Free the storage used for the word-strings and vector that
@code{*@var{word-vector-ptr}} points to. This does not free the
structure @code{*@var{word-vector-ptr}} itself---only the other