Issue Details (XML | Word | Printable)

Key: STDCXX-1020
Type: Sub-task Sub-task
Status: Open Open
Priority: Major Major
Assignee: Martin Sebor
Reporter: Scott (Yu) Zhong
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
C++ Standard Library
STDCXX-401

memchk() in locale utility should honor TMPDIR variable

Created: 08/Oct/08 05:06 PM   Updated: 31/Oct/08 08:14 PM
Return to search
Component/s: Utilities
Affects Version/s: 4.2.1
Fix Version/s: 4.2.2

Time Tracking:
Original Estimate: 1h
Original Estimate - 1h
Remaining Estimate: 1h
Remaining Estimate - 1h
Time Spent: Not Specified
Remaining Estimate - 1h

File Attachments:
  Size
Text File Licensed for inclusion in ASF works STDCXX-1020.patch 2008-10-28 03:22 PM Scott (Yu) Zhong 1 kB
Environment:
SunOS clue 5.10 Generic_118833-33 sun4u sparc SUNW,Sun-Fire-V215
CC: Sun C++ 5.9 SunOS_sparc 2007/05/03

Patch Info: Patch Available


 Description  « Hide
TMPDIR should be honored in the utility function memchk

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Martin Sebor added a comment - 21/Oct/08 05:02 AM
Will fix in 4.2.2 (patch is available in this post).

Scott (Yu) Zhong added a comment - 28/Oct/08 03:22 PM
Patch available in the file attachments part of this bug.

Martin Sebor added a comment - 31/Oct/08 08:12 PM
There's a problem with the patch. After applying it, locale tests fail one extra assertion – see below (all tests except sanity_test.sh pass at 100% without the patch in place):
$ gmake -C../bin run                                
gmake: Entering directory `/build/sebor/stdcxx-4.2.x-aCC-6.16-15D/bin'
NAME                                     STATUS WARN ASSERTS FAILED PERCNT    USER     SYS    REAL
sanity_test.sh                                0    0     229      5    97%   0.400   1.310   2.560
af_ZA.ISO-8859-1.sh                           0    0      16      1    93%   4.670   0.290   5.040
ar_AE.ISO-8859-6.sh                           0    0      16      1    93%   4.640   0.290   4.960
ar_BH.ISO-8859-6.sh                           0    0      16      1    93%   4.640   0.290   4.960
ar_DZ.ISO-8859-6.sh                           0    0      16      1    93%   4.640   0.290   4.940
ar_EG.ISO-8859-6.sh                           0    0      16      1    93%   4.630   0.300   4.950
ar_IN.UTF-8.sh                                0    0      16      1    93%  46.250   1.010  47.330
...

Running one of the locale tests in debug mode (with the -d option) produces the following output:

$ ./af_ZA.ISO-8859-1.sh -d
RWSTD_SRC_ROOT=/amd/devco/sebor/stdcxx-4.2.x/etc/nls
export RWSTD_SRC_ROOT
mkdir -p /tmp/af_ZA.ISO-8859-1.17498/stage.1/charmaps
./localedef -w -c -f /amd/devco/sebor/stdcxx-4.2.x/etc/nls/charmaps/ISO-8859-1 -i /amd/devco/sebor/stdcxx-4.2.x/etc/nls/src/af_ZA /tmp/af_ZA.ISO-8859-1.17498/stage.1/af_ZA.ISO-8859-1 >/dev/tty 2>&1
LC_ALL=/tmp/af_ZA.ISO-8859-1.17498/stage.1/af_ZA.ISO-8859-1 ./locale --charmap -l >/tmp/af_ZA.ISO-8859-1.17498/stage.1/charmaps/ISO-8859-1 2>/dev/tty
Error 399: invalid size at address 9fffffffef78c000: 4294967295, expected 352
LC_ALL=/tmp/af_ZA.ISO-8859-1.17498/stage.1/af_ZA.ISO-8859-1 ./locale -ck -h -l LC_ALL >/tmp/af_ZA.ISO-8859-1.17498/stage.1/af_ZA.src 2>/dev/tty
Error 399: invalid size at address 9fffffffef78c000: 4294967295, expected 352
rm /tmp/af_ZA.ISO-8859-1.17498/stage.1/af_ZA.ISO-8859-1
rm: /tmp/af_ZA.ISO-8859-1.17498/stage.1/af_ZA.ISO-8859-1 directory
mkdir -p /tmp/af_ZA.ISO-8859-1.17498/stage.2/charmaps
./localedef -w -c -f /tmp/af_ZA.ISO-8859-1.17498/stage.1/charmaps/ISO-8859-1 -i /tmp/af_ZA.ISO-8859-1.17498/stage.1/af_ZA.src /tmp/af_ZA.ISO-8859-1.17498/stage.2/af_ZA.ISO-8859-1 >/dev/tty 2>&1
RWSTD_SRC_ROOT=/tmp/af_ZA.ISO-8859-1.17498/stage.1
export RWSTD_SRC_ROOT
LC_ALL=/tmp/af_ZA.ISO-8859-1.17498/stage.2/af_ZA.ISO-8859-1 ./locale --charmap -l >/tmp/af_ZA.ISO-8859-1.17498/stage.2/charmaps/ISO-8859-1 2>/dev/tty
LC_ALL=/tmp/af_ZA.ISO-8859-1.17498/stage.2/af_ZA.ISO-8859-1 ./locale -ck -h -l LC_ALL >/tmp/af_ZA.ISO-8859-1.17498/stage.2/af_ZA.src 2>/dev/tty
Warning 709: no charmap name
rm /tmp/af_ZA.ISO-8859-1.17498/stage.2/af_ZA.ISO-8859-1
rm: /tmp/af_ZA.ISO-8859-1.17498/stage.2/af_ZA.ISO-8859-1 directory
mkdir -p /tmp/af_ZA.ISO-8859-1.17498/stage.3/charmaps
./localedef -w -c -f /tmp/af_ZA.ISO-8859-1.17498/stage.2/charmaps/ISO-8859-1 -i /tmp/af_ZA.ISO-8859-1.17498/stage.2/af_ZA.src /tmp/af_ZA.ISO-8859-1.17498/stage.3/af_ZA.ISO-8859-1 >/dev/tty 2>&1
RWSTD_SRC_ROOT=/tmp/af_ZA.ISO-8859-1.17498/stage.2
export RWSTD_SRC_ROOT
LC_ALL=/tmp/af_ZA.ISO-8859-1.17498/stage.3/af_ZA.ISO-8859-1 ./locale --charmap -l >/tmp/af_ZA.ISO-8859-1.17498/stage.3/charmaps/ISO-8859-1 2>/dev/tty
Error 399: invalid size at address 9fffffffef79e000: 4294967295, expected 352
LC_ALL=/tmp/af_ZA.ISO-8859-1.17498/stage.3/af_ZA.ISO-8859-1 ./locale -ck -h -l LC_ALL >/tmp/af_ZA.ISO-8859-1.17498/stage.3/af_ZA.src 2>/dev/tty
Error 399: invalid size at address 9fffffffef79e000: 4294967295, expected 352
rm /tmp/af_ZA.ISO-8859-1.17498/stage.3/af_ZA.ISO-8859-1
rm: /tmp/af_ZA.ISO-8859-1.17498/stage.3/af_ZA.ISO-8859-1 directory
diff /tmp/af_ZA.ISO-8859-1.17498/stage.1/charmaps/ISO-8859-1  /tmp/af_ZA.ISO-8859-1.17498/stage.2/charmaps/ISO-8859-1 >/dev/null
diff /tmp/af_ZA.ISO-8859-1.17498/stage.2/charmaps/ISO-8859-1  /tmp/af_ZA.ISO-8859-1.17498/stage.3/charmaps/ISO-8859-1 >/dev/null
diff /tmp/af_ZA.ISO-8859-1.17498/stage.2/af_ZA.src  /tmp/af_ZA.ISO-8859-1.17498/stage.3/af_ZA.src >/dev/null
## AssertionFailed: /tmp/af_ZA.ISO-8859-1.17498/stage.2/af_ZA.src  and /tmp/af_ZA.ISO-8859-1.17498/stage.3/af_ZA.src differ.
rm -rf /tmp/af_ZA.ISO-8859-1.17498/stage.1 /tmp/af_ZA.ISO-8859-1.17498/stage.2 /tmp/af_ZA.ISO-8859-1.17498/stage.3
# +-----------------------+----------+----------+----------+
# | DIAGNOSTIC            |  ACTIVE  |   TOTAL  | INACTIVE |
# +-----------------------+----------+----------+----------+
# | (S7) ASSERTION        |        1 |       16 |      93% |
# +-----------------------+----------+----------+----------+

## Warnings = 0
## Assertions = 16
## FailedAssertions = 1

rm -rf /tmp/af_ZA.ISO-8859-1.17498

Martin Sebor added a comment - 31/Oct/08 08:14 PM
Also, if/when you post a new patch, please do try to remember to include the changelog entry with it.