From owner-freebsd-questions@FreeBSD.ORG Thu Jun 9 20:14:33 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 30D2616A41C for ; Thu, 9 Jun 2005 20:14:33 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id E677643D49 for ; Thu, 9 Jun 2005 20:14:32 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id j59KEW5v054522; Thu, 9 Jun 2005 15:14:32 -0500 (CDT) (envelope-from dan) Date: Thu, 9 Jun 2005 15:14:32 -0500 From: Dan Nelson To: Keyser Message-ID: <20050609201431.GD2836@dan.emsphone.com> References: <002001c56d2c$fffd5bf0$5b01a8c0@mdis> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <002001c56d2c$fffd5bf0$5b01a8c0@mdis> X-OS: FreeBSD 5.4-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.9i Cc: freebsd-questions@freebsd.org Subject: Re: g++ successfully compiled "Hello World" program causes segfault at runtime X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jun 2005 20:14:33 -0000 In the last episode (Jun 09), Keyser said: > I posted this topic a few days ago but still haven't found a solution > yet. However, I believe I'm able to provide more information now. > Here is a log showing what I'm up against: > > vitoc# cat test.cpp > #include > using namespace std; > > int main() > { > cout << "Hello world!"; > return 0; > } > vitoc# g++ -g -o test test.cpp > vitoc# gdb test > (gdb) run > Starting program: /usr/temp/cpp/test > > Program received signal SIGSEGV, Segmentation fault. > 0x2819d7de in wctype () from /lib/libc.so.5 > (gdb) bt > #0 0x2819d7de in wctype () from /lib/libc.so.5 > #1 0x28119002 in std::ctype::_M_convert_to_wmask () from /usr/lib/libstdc++.so.4 > #2 0x28119453 in std::ctype::_M_initialize_ctype () from /usr/lib/libstdc++.so.4 > #3 0x28119b08 in std::ctype::ctype () from /usr/lib/libstdc++.so.4 > #4 0x28112a69 in std::locale::_Impl::_Impl () from /usr/lib/libstdc++.so.4 Do you have any locale environment variables set? The program runs fine on my machine. -- Dan Nelson dnelson@allantgroup.com