[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/28779] New: libiberty -Wuse-after-free instances for freed
From: |
msebor at gmail dot com |
Subject: |
[Bug binutils/28779] New: libiberty -Wuse-after-free instances for freed pointer subtraction |
Date: |
Thu, 13 Jan 2022 21:47:11 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=28779
Bug ID: 28779
Summary: libiberty -Wuse-after-free instances for freed pointer
subtraction
Product: binutils
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: msebor at gmail dot com
Target Milestone: ---
Testing a GCC 12 enhancement (not yet on trunk) to detect uses of pointers
rendered indeterminate by a deallocation call exposes a number of instances in
libiberty. They all seem to be due to using a reallocated pointer in a
subtraction expression. Although typically benign, any uses of such pointers
are undefined. An easy way to avoid the warnings is to convert the pointer
operand before the realloc call to an intptr_t and using it in the subsequent
subtraction instead.
-Wuse-after-free Instances:
/src/binutils-gdb/libiberty/regex.c:2086
/src/binutils-gdb/libiberty/regex.c:2086
/src/binutils-gdb/libiberty/regex.c: In function ‘byte_regex_compile’:
yes
checking for socklen_t...
/src/binutils-gdb/libiberty/regex.c:2086:22: warning: pointer may be used after
‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2468:15: note: in expansion of macro
‘BUF_PUSH’
2468 | BUF_PUSH (begline);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2468:15: note: in expansion of macro
‘BUF_PUSH’
2468 | BUF_PUSH (begline);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2086:22: warning: pointer may be used after
‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2483:16: note: in expansion of macro
‘BUF_PUSH’
2483 | BUF_PUSH (endline);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2483:16: note: in expansion of macro
‘BUF_PUSH’
2483 | BUF_PUSH (endline);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2086:22: warning: pointer may be used after
‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2577:17: note: in expansion of macro
‘GET_BUFFER_SPACE’
2577 | GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2577:17: note: in expansion of macro
‘GET_BUFFER_SPACE’
2577 | GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2086:22: warning: pointer may be used after
‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2605:13: note: in expansion of macro
‘GET_BUFFER_SPACE’
2605 | GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2605:13: note: in expansion of macro
‘GET_BUFFER_SPACE’
2605 | GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2086:22: warning: pointer may be used after
‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2619:17: note: in expansion of macro
‘GET_BUFFER_SPACE’
2619 | GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2619:17: note: in expansion of macro
‘GET_BUFFER_SPACE’
2619 | GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2086:22: warning: pointer may be used after
‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2630:11: note: in expansion of macro
‘BUF_PUSH’
2630 | BUF_PUSH (anychar);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2630:11: note: in expansion of macro
‘BUF_PUSH’
2630 | BUF_PUSH (anychar);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2086:22: warning: pointer may be used after
‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:3109:13: note: in expansion of macro
‘GET_BUFFER_SPACE’
3109 | GET_BUFFER_SPACE (34);
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:3109:13: note: in expansion of macro
‘GET_BUFFER_SPACE’
3109 | GET_BUFFER_SPACE (34);
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2086:22: warning: pointer may be used after
‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:3115:13: note: in expansion of macro
‘BUF_PUSH’
3115 | BUF_PUSH (*p == '^' ? charset_not : charset);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:3115:13: note: in expansion of macro
‘BUF_PUSH’
3115 | BUF_PUSH (*p == '^' ? charset_not : charset);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2086:22: warning: pointer may be used after
‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:3123:13: note: in expansion of macro
‘BUF_PUSH’
3123 | BUF_PUSH ((1 << BYTEWIDTH) / BYTEWIDTH);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:3123:13: note: in expansion of macro
‘BUF_PUSH’
3123 | BUF_PUSH ((1 << BYTEWIDTH) / BYTEWIDTH);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2086:22: warning: pointer may be used after
‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1966:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1966 | GET_BUFFER_SPACE (3);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:3689:19: note: in expansion of macro
‘BUF_PUSH_3’
3689 | BUF_PUSH_3 (start_memory, regnum, 0);
| ^~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1966:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1966 | GET_BUFFER_SPACE (3);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:3689:19: note: in expansion of macro
‘BUF_PUSH_3’
3689 | BUF_PUSH_3 (start_memory, regnum, 0);
| ^~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2086:22: warning: pointer may be used after
‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:3721:19: note: in expansion of macro
‘BUF_PUSH’
3721 | BUF_PUSH (push_dummy_failure);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:3721:19: note: in expansion of macro
‘BUF_PUSH’
3721 | BUF_PUSH (push_dummy_failure);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2086:22: warning: pointer may be used after
‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1966:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1966 | GET_BUFFER_SPACE (3);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:3767:21: note: in expansion of macro
‘BUF_PUSH_3’
3767 | BUF_PUSH_3 (stop_memory, this_group_regnum,
| ^~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1966:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1966 | GET_BUFFER_SPACE (3);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:3767:21: note: in expansion of macro
‘BUF_PUSH_3’
3767 | BUF_PUSH_3 (stop_memory, this_group_regnum,
| ^~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2086:22: warning: pointer may be used after
‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:3783:15: note: in expansion of macro
‘GET_BUFFER_SPACE’
3783 | GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:3783:15: note: in expansion of macro
‘GET_BUFFER_SPACE’
3783 | GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2086:22: warning: pointer may be used after
‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:3812:15: note: in expansion of macro
‘GET_BUFFER_SPACE’
3812 | GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:3812:15: note: in expansion of macro
‘GET_BUFFER_SPACE’
3812 | GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2086:22: warning: pointer may be used after
‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:3891:22: note: in expansion of macro
‘GET_BUFFER_SPACE’
3891 | GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:3891:22: note: in expansion of macro
‘GET_BUFFER_SPACE’
3891 | GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
| ^~~~~~~~~~~~~~~~
yes
checking for ssize_t... /src/binutils-gdb/libiberty/regex.c:2086:22: warning:
pointer may be used after ‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:3912:22: note: in expansion of macro
‘GET_BUFFER_SPACE’
3912 | GET_BUFFER_SPACE (nbytes);
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:3912:22: note: in expansion of macro
‘GET_BUFFER_SPACE’
3912 | GET_BUFFER_SPACE (nbytes);
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2086:22: warning: pointer may be used after
‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:4010:15: note: in expansion of macro
‘BUF_PUSH’
4010 | BUF_PUSH (wordchar);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:4010:15: note: in expansion of macro
‘BUF_PUSH’
4010 | BUF_PUSH (wordchar);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2086:22: warning: pointer may be used after
‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:4018:15: note: in expansion of macro
‘BUF_PUSH’
4018 | BUF_PUSH (notwordchar);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:4018:15: note: in expansion of macro
‘BUF_PUSH’
4018 | BUF_PUSH (notwordchar);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2086:22: warning: pointer may be used after
‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:4025:15: note: in expansion of macro
‘BUF_PUSH’
4025 | BUF_PUSH (wordbeg);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:4025:15: note: in expansion of macro
‘BUF_PUSH’
4025 | BUF_PUSH (wordbeg);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2086:22: warning: pointer may be used after
‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:4031:15: note: in expansion of macro
‘BUF_PUSH’
4031 | BUF_PUSH (wordend);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:4031:15: note: in expansion of macro
‘BUF_PUSH’
4031 | BUF_PUSH (wordend);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2086:22: warning: pointer may be used after
‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:4037:15: note: in expansion of macro
‘BUF_PUSH’
4037 | BUF_PUSH (wordbound);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:4037:15: note: in expansion of macro
‘BUF_PUSH’
4037 | BUF_PUSH (wordbound);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2086:22: warning: pointer may be used after
‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:4043:15: note: in expansion of macro
‘BUF_PUSH’
4043 | BUF_PUSH (notwordbound);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:4043:15: note: in expansion of macro
‘BUF_PUSH’
4043 | BUF_PUSH (notwordbound);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2086:22: warning: pointer may be used after
‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:4049:15: note: in expansion of macro
‘BUF_PUSH’
4049 | BUF_PUSH (begbuf);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:4049:15: note: in expansion of macro
‘BUF_PUSH’
4049 | BUF_PUSH (begbuf);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2086:22: warning: pointer may be used after
‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:4055:15: note: in expansion of macro
‘BUF_PUSH’
4055 | BUF_PUSH (endbuf);
| ^~~~~~~~
yes
checking whether stat handles trailing slashes on files...
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:4055:15: note: in expansion of macro
‘BUF_PUSH’
4055 | BUF_PUSH (endbuf);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2086:22: warning: pointer may be used after
‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1957:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1957 | GET_BUFFER_SPACE (2);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:4073:15: note: in expansion of macro
‘BUF_PUSH_2’
4073 | BUF_PUSH_2 (duplicate, c1);
| ^~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1957:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1957 | GET_BUFFER_SPACE (2);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:4073:15: note: in expansion of macro
‘BUF_PUSH_2’
4073 | BUF_PUSH_2 (duplicate, c1);
| ^~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2086:22: warning: pointer may be used after
‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1957:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1957 | GET_BUFFER_SPACE (2);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:4134:15: note: in expansion of macro
‘BUF_PUSH_2’
4134 | BUF_PUSH_2 (exactn, 0);
| ^~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1957:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1957 | GET_BUFFER_SPACE (2);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:4134:15: note: in expansion of macro
‘BUF_PUSH_2’
4134 | BUF_PUSH_2 (exactn, 0);
| ^~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2086:22: warning: pointer may be used after
‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:4139:11: note: in expansion of macro
‘BUF_PUSH’
4139 | BUF_PUSH (c);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:4139:11: note: in expansion of macro
‘BUF_PUSH’
4139 | BUF_PUSH (c);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2086:22: warning: pointer may be used after
‘realloc’ [-Wuse-after-free]
2086 | PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;
\
| ^~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:4157:5: note: in expansion of macro
‘BUF_PUSH’
4157 | BUF_PUSH (succeed);
| ^~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2007:25: note: call to ‘realloc’ here
2007 | # define REALLOC(p,s) realloc ((p), (s))
| ^~~~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:2079:32: note: in expansion of macro
‘REALLOC’
2079 | bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,
\
| ^~~~~~~
/src/binutils-gdb/libiberty/regex.c:1943:7: note: in expansion of macro
‘EXTEND_BUFFER’
1943 | EXTEND_BUFFER ()
| ^~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:1949:5: note: in expansion of macro
‘GET_BUFFER_SPACE’
1949 | GET_BUFFER_SPACE (1);
\
| ^~~~~~~~~~~~~~~~
/src/binutils-gdb/libiberty/regex.c:4157:5: note: in expansion of macro
‘BUF_PUSH’
4157 | BUF_PUSH (succeed);
| ^~~~~~~~
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/28779] New: libiberty -Wuse-after-free instances for freed pointer subtraction,
msebor at gmail dot com <=
- [Bug binutils/28779] libiberty -Wuse-after-free instances for freed pointer subtraction, nickc at redhat dot com, 2022/01/22
- [Bug binutils/28779] libiberty -Wuse-after-free instances for freed pointer subtraction, msebor at gmail dot com, 2022/01/24
- [Bug binutils/28779] libiberty -Wuse-after-free instances for freed pointer subtraction, cvs-commit at gcc dot gnu.org, 2022/01/24
- [Bug binutils/28779] libiberty -Wuse-after-free instances for freed pointer subtraction, cvs-commit at gcc dot gnu.org, 2022/01/24
- [Bug binutils/28779] libiberty -Wuse-after-free instances for freed pointer subtraction, nickc at redhat dot com, 2022/01/24