]>
git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++/regex: Zero-initialize _ExecutorFrame flags
Prevents uninitialized read bugs, and it's also just natural to assume
flags are initially cleared rather than uninitialized.
In passing rename the _M_end flag to _M_subexpr_end to make it distinct
from _Executor::_M_end.
libstdc++-v3/ChangeLog:
* include/bits/regex_executor.tcc (_ExecutorFrameBase):
Zero-initialize _M_byte0.
(_ExecutorFrameBase::_M_end): Rename to ...
(_ExecutorFrameBase::_M_subexpr_end): ... this.
(_Executor::_M_handle_subexpr_begin): Remove now redundant
clearing of _M_subexpr_end.
(_Executor::_M_handle_subexpr_end): Adjust after renaming.
(_Executor::_M_dfs) <case _S_fopcode_restore_cur_results>:
Likewise.
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>