stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicole Willson" <>
Subject RE: FW: 17116,756,000
Date Wed, 09 Aug 2006 15:09:54 GMT
There is a workaround that keeps it from aborting - basically instead of
calling x = foo("some string");, you set the string ahead of time, ie
Char *some_str = "some string"; x = foo(some_str);

This keeps it from screwing up the return of foo. 

The failures that I am now getting are failed assertions because catopen
fails and returns a -1 instead of the catid needed by stress_test.

-----Original Message-----
From: Martin Sebor [] 
Sent: Tuesday, August 08, 2006 3:35 PM
Subject: Re: FW: 17116,756,000

Nicole Willson wrote:
> Ok, in the messages.cpp test, the test_use_nls_path works fine, but 
> the stress test fails.

How does it fail? (Error messages, stack trace, ...) I get an abort with
xlC but not with gcc on the same machine (the stack trace is attached).
The test craps out long before it ever gets to stress_test. This is  the
same problem with exceptions that we talked about some time ago and that
someone still needs to get to the bottom of.

> According to IBM, this is because the NLSPATH environment variable 
> needs to be set and setlocale must be called.

AFAICS, NLSPATH is set in test_use_nls_path and stays set for the
remainder of the lifetime of the test (which includes the stress_test

> Stress_test does not set the absolute path, but seems to set the
> My question is: since test_use_nls_path is called before stress_test, 
> is it expected that the NLSPATH variable will still be in the

Yes. AFAICT, the test does nothing to remove it from the environment so
it should still be there.

> Regarding pmr 17116,756, if the catalog file name referred to by the 
> CatalogName parameter contains a leading / (slash), it is assumed to 
> be an absolute path name. If the catalog file name is not an absolute 
> path name, the user environment determines which directory paths to
> The NLSPATH environment variable defines the directory search path. 
> When this variable is used, the setlocale subroutine must be called 
> before the catopen subroutine.

I don't think the last sentence is correct. I certainly don't see any
such requirement in POSIX or on the Linux catopen() man page.
Also, I don't see any assumptions about this in the GNU catopen sources
(catopen() calls setlocale(LC_MESSAGES, 0) when the flag is set to
NL_CAT_LOCALE but only to retrieve the setting of the LC_MESSAGES

See and


> John Carver                           Phone:  512-823-9076
> IBM Server Group                        (t/l 793-9076)
> ISV Technical Programs

View raw message