Re: [PATCH] libstdc++: fix memory clobbering in std::vector [PR110879]

2023-08-17 Thread Vladimir Palevich via Gcc-patches
On Thu, 17 Aug 2023 at 01:51, Jonathan Wakely wrote: > > On 09/08/23 01:34 +0300, Vladimir Palevich wrote: > >Because of the recent change in _M_realloc_insert and _M_default_append, call > >to deallocate was ordered after assignment to class members of std::vector > >(in the guard destructor), wh

[PATCH] libstdc++: fix memory clobbering in std::vector [PR110879]

2023-08-08 Thread Vladimir Palevich via Gcc-patches
Because of the recent change in _M_realloc_insert and _M_default_append, call to deallocate was ordered after assignment to class members of std::vector (in the guard destructor), which is causing said members to be call-clobbered. This is preventing further optimization, the compiler is unable to