From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 126869 invoked by alias); 6 May 2015 15:43:10 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 126828 invoked by uid 48); 6 May 2015 15:43:05 -0000 From: "jan.kratochvil at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/59675] -D_GLIBCXX_DEBUG asserts to stdout (it should stderr) Date: Wed, 06 May 2015 15:43:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 4.8.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jan.kratochvil at redhat dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-05/txt/msg00498.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59675 --- Comment #5 from Jan Kratochvil --- gcc-4.9.2-6.fc21.x86_64: gcc-5.1.1-1.fc23.x86_64 #include int main() { __gnu_debug::string s((const char *)0); } g++ -o gcc59675b gcc59675b.C -Wall -g -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC ./gcc59675b 2>/dev/null /usr/include/c++/5.1.1/debug/functions.h:315: const _CharT* __gnu_debug::__check_string(const _CharT*) [with _CharT = char]: Assertion '__s != 0' failed. Aborted I was hitting this issue often on some older GCC versions but now I find it very difficult to reproduce. __glibcxx_assert() is probably no longer too much used. For some reason I could no longer even reproduce it with std::string.