I confirmed this issue on x86_64 CentOS, and independently here: https://wandbox.org/permlink/ncWqA9Zu3YEofqri
Also fails on gcc trunk. Possibly related to bug 81338 "stringstream remains empty after being moved into multiple times"? Although I see that one is fixed by Mr Wakely. Dave On Tue, Sep 12, 2017 at 5:59 PM, Shane Matley <general+...@matley.com.au> wrote: > Hi, > > Apologies if I am coming about this in the wrong way, I am new to the > mailing list. During our preliminary work to upgrade to gcc 7.2 (from > 6.3) at my workplace, we have come across a bug that is blocking our > move to C++17. I have raised a bug report here: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82172. > > There is an invalid free in a string within basic_stringbuf when > inserting a character into an empty stringbuf when using the pre CXX11 > ABI, LTO, O1 and C++17. > > Could anyone offer some advice on diagnosing this further, or working > around this issue that doesn't involve moving to the CXX11 ABI? > > Thanks in advance, > > -- Shane