Date: Thu, 9 Jun 2005 15:14:32 -0500 From: Dan Nelson <dnelson@allantgroup.com> To: Keyser <keyser456@verizon.net> Cc: freebsd-questions@freebsd.org Subject: Re: g++ successfully compiled "Hello World" program causes segfault at runtime Message-ID: <20050609201431.GD2836@dan.emsphone.com> In-Reply-To: <002001c56d2c$fffd5bf0$5b01a8c0@mdis> References: <002001c56d2c$fffd5bf0$5b01a8c0@mdis>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <iostream>
> 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<wchar_t>::_M_convert_to_wmask () from /usr/lib/libstdc++.so.4
> #2  0x28119453 in std::ctype<wchar_t>::_M_initialize_ctype () from /usr/lib/libstdc++.so.4
> #3  0x28119b08 in std::ctype<wchar_t>::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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050609201431.GD2836>
