[Bug libstdc++/90634] filesystem::path insane memory allocations

1000hz.radiowave at gmail dot com gcc-bugzilla@gcc.gnu.org
Sun May 26 13:09:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90634

baltic <1000hz.radiowave at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|FIXED                       |---

--- Comment #3 from baltic <1000hz.radiowave at gmail dot com> ---
(In reply to Jonathan Wakely from comment #2)

> I'm not sure where the repeated 72 allocations come from, and can't check
> the code right now, but the new code doesn't do it anyway.

It comes from std::string creation, which then is passed to path constructor.

> I think this can be considered fixed.

hardly. the gcc 9.1 is even worse in that regard, as it allocates 2kB of memory
for the same case
see the line:

about to quit. total allocated 2131 bytes

in here:
https://wandbox.org/permlink/u9dEfPh1Zc5pmJ34


More information about the Gcc-bugs mailing list