From owner-freebsd-bugs@FreeBSD.ORG Tue Nov 16 12:00:20 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92580106566C for ; Tue, 16 Nov 2010 12:00:20 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 44E8C8FC0A for ; Tue, 16 Nov 2010 12:00:20 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oAGC0Kvj072855 for ; Tue, 16 Nov 2010 12:00:20 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oAGC0Kln072854; Tue, 16 Nov 2010 12:00:20 GMT (envelope-from gnats) Resent-Date: Tue, 16 Nov 2010 12:00:20 GMT Resent-Message-Id: <201011161200.oAGC0Kln072854@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, kenorb Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E133D106564A for ; Tue, 16 Nov 2010 11:50:20 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id CFA248FC08 for ; Tue, 16 Nov 2010 11:50:20 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id oAGBoK4G013000 for ; Tue, 16 Nov 2010 11:50:20 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id oAGBoKej012999; Tue, 16 Nov 2010 11:50:20 GMT (envelope-from nobody) Message-Id: <201011161150.oAGBoKej012999@www.freebsd.org> Date: Tue, 16 Nov 2010 11:50:20 GMT From: kenorb To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/152293: SEGV in libstdc++.so.6 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 12:00:20 -0000 >Number: 152293 >Category: misc >Synopsis: SEGV in libstdc++.so.6 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Nov 16 12:00:19 UTC 2010 >Closed-Date: >Last-Modified: >Originator: kenorb >Release: FreeBSD 8.1-STABLE >Organization: >Environment: FreeBSD kenorb 8.1-STABLE FreeBSD 8.1-STABLE #4: Mon Nov 15 14:40:15 GMT 2010 root@kenorb:/usr/obj/usr/src/sys/BRO amd64 >Description: libstdc++.so.6 doing SEGV when run mysql-workbench-bin #1 0x0000000808dc9bc1 in std::char_traits::length (__s=0x0) at char_traits.h:258 #2 0x0000000808dcbe15 in std::string::assign (this=0x7fffffffe4b0, __s=0x0) at basic_string.h:920 #3 0x0000000808dcbe45 in std::string::operator= (this=0x7fffffffe4b0, __s=0x0) at basic_string.h:499 Backtrace: (gdb) bt full #0 0x00000008092c05b7 in strlen () from /lib/libc.so.7 #1 0x0000000808dc9bc1 in std::char_traits::length (__s=0x0) at char_traits.h:258 #2 0x0000000808dcbe15 in std::string::assign (this=0x7fffffffe4b0, __s=0x0) at basic_string.h:920 #3 0x0000000808dcbe45 in std::string::operator= (this=0x7fffffffe4b0, __s=0x0) at basic_string.h:499 #4 0x000000000070a87a in main (argc=1, argv=0x7fffffffe768) at main.cpp:113 It should not pass NULL into libc. See more: http://forums.freebsd.org/showthread.php?t=19387 >How-To-Repeat: > mysql-workbench-bin Segmentation fault >Fix: Check if __s is NULL? #2 0x0000000808dcbe15 in std::string::assign (this=0x7fffffffe4b0, __s=0x0) at basic_string.h:920 /** * @brief Set value to contents of a C string. * @param s The C string to use. * @return Reference to this string. * * This function sets the value of this string to the value of @a s. * The data is copied, so there is no dependence on @a s once the * function returns. */ basic_string& assign(const _CharT* __s) { __glibcxx_requires_string(__s); return this->assign(__s, traits_type::length(__s)); #1 0x0000000808dc9bc1 in std::char_traits::length (__s=0x0) at char_traits.h:258 static size_t length(const char_type* __s) { return strlen(__s); } >Release-Note: >Audit-Trail: >Unformatted: