public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/10564: Statically linked C++ program cannot be transferred from RHL 9 to RHL 7.3
@ 2003-05-16 21:11 bkoz
  0 siblings, 0 replies; 2+ messages in thread
From: bkoz @ 2003-05-16 21:11 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, jakub, nobody, peter.klotz

Synopsis: Statically linked C++ program cannot be transferred from RHL 9 to RHL 7.3

Responsible-Changed-From-To: unassigned->jakub
Responsible-Changed-By: bkoz
Responsible-Changed-When: Fri May 16 21:11:45 2003
Responsible-Changed-Why:
    Hey Jakub. Can I convince you to look at a ctype issue that  impact libstc++ moving across RHL versions? I'm not quite sure what to do about this.
    
    -benjamin
State-Changed-From-To: open->analyzed
State-Changed-By: bkoz
State-Changed-When: Fri May 16 21:11:45 2003
State-Changed-Why:
    Confirmed. Note that moving from RHL 7.3 to RHL 9.0 works, but not the other way.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10564


^ permalink raw reply	[flat|nested] 2+ messages in thread

* libstdc++/10564: Statically linked C++ program cannot be transferred from RHL 9 to RHL 7.3
@ 2003-04-30 12:16 peter.klotz
  0 siblings, 0 replies; 2+ messages in thread
From: peter.klotz @ 2003-04-30 12:16 UTC (permalink / raw)
  To: gcc-gnats


>Number:         10564
>Category:       libstdc++
>Synopsis:       Statically linked C++ program cannot be transferred from RHL 9 to RHL 7.3
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 30 12:16:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     peter.klotz@aon.at
>Release:        unknown-1.0
>Organization:
>Environment:
Red Hat Linux 9, gcc 3.2.2, glibc 2.3.2
Red Hat Linux 7.3, glibc 2.2.4
>Description:
A statically linked program using a static C++ locale object like in the example below cannot be transferred from RHL 9 to RHL 7.3.

The program works on RHL 9 but crashes at static cleanup under RHL 7.3.

Here is the backtrace from RHL 7.3:
(gdb) bt
#0  0x00000004 in ?? ()
#1  0x080ab7b1 in _nl_cleanup_ctype ()
#2  0x0808b056 in _nl_unload_locale ()
#3  0x0808c089 in freelocale ()
#4  0x0805d5bd in std::messages<wchar_t>::~messages() ()
#5  0x08049a5c in std::locale::facet::_M_remove_reference() ()
#6  0x08060c58 in std::locale::_Impl::~_Impl() ()
#7  0x0804920d in std::locale::~locale() ()
#8  0x0804823f in __tcf_0 ()
#9  0x08090ab2 in exit ()
#10 0x08089d6b in __libc_start_main ()

Is it my fault because of the two different glibc versions?
Shouldn't statically linking avoid such problems?

When the locale "de_AT@euro" is replaced with "C" the program works as expected. Nevertheless the locale "de_AT@euro" is present on the RHL 7.3 system (according to locale -a).
>How-To-Repeat:
* Compile program on RHL 9:
g++ -static locale.cpp -o locale
* Copy it to a RHL 7.3 installation and run it
./locale
Segmentation fault (core dumped)
>Fix:
#include <locale>

class String { static std::locale m_locale; };
std::locale String::m_locale("de_AT@euro");

int main(void)
{ return 0; }
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-05-16 21:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-16 21:11 libstdc++/10564: Statically linked C++ program cannot be transferred from RHL 9 to RHL 7.3 bkoz
  -- strict thread matches above, loose matches on Subject: below --
2003-04-30 12:16 peter.klotz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).