Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 83815 invoked from network); 16 Aug 2006 14:38:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 Aug 2006 14:38:52 -0000 Received: (qmail 64101 invoked by uid 500); 16 Aug 2006 14:38:52 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 64073 invoked by uid 500); 16 Aug 2006 14:38:51 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 64051 invoked by uid 99); 16 Aug 2006 14:38:51 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Aug 2006 07:38:51 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [212.82.213.172] (HELO exkiv.kyiv.vdiweb.com) (212.82.213.172) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Aug 2006 07:38:50 -0700 Received: from [10.11.37.198] ([10.11.37.198]) by exkiv.kyiv.vdiweb.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 16 Aug 2006 17:38:46 +0300 Message-ID: <44E32DF6.2080803@kyiv.vdiweb.com> Date: Wed, 16 Aug 2006 17:38:46 +0300 From: Farid Zaripov User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: stdcxx-dev@incubator.apache.org Subject: RE: [patch] resolve segv in locale/localedef Content-Type: multipart/mixed; boundary="------------000908090904010202030704" X-OriginalArrivalTime: 16 Aug 2006 14:38:46.0302 (UTC) FILETIME=[AE01B3E0:01C6C141] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --------------000908090904010202030704 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit > -----Original Message----- > From: Andrew Black [mailto:ablack@roguewave.com] > Sent: Wednesday, August 16, 2006 12:03 AM > To: stdcxx-dev@incubator.apache.org > Subject: [patch] resolve segv in locale/localedef > > Below is a 2 line patch to the locale and localedef utilities > that resolves a segfault encountered during automated testing > (and adds a missing newline). This problem generally shows > up during stage 2 of the run_locale_utils.sh script. See, please, the attached patch. Without this patch I got the following diagnostic message within validate() function (locale.cpp, line 103): "Error 399: invalid size at 00AE0000: 4294967295, expected 352". Platform: Windows. Farid. --------------000908090904010202030704 Content-Type: text/plain; name="memchk.cpp.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="memchk.cpp.diff" Index: memchk.cpp =================================================================== --- memchk.cpp (revision 431866) +++ memchk.cpp (working copy) @@ -2,7 +2,7 @@ * * memchk.cpp - definitions of memory checking helper functions * - * $Id: //stdlib/dev/source/stdlib/util/memchk.cpp#5 $ + * $Id$ * *************************************************************************** * @@ -107,11 +107,16 @@ // create a temporary file and have Win32 delete it when // the last file descriptor that refers to it is closed - fd = open (fname, O_RDWR | _O_TEMPORARY, 0666); + fd = open (fname, O_RDWR | O_CREAT | _O_TEMPORARY, 0666); // free storage allocated by tempnam() free (fname); + if (fd < 0) { + // error: unable to check addr + return size_t (-1); + } + #else // !_WIN{32,64} # define TMP_TEMPLATE P_tmpdir "/rwmemchk-XXXXXX" --------------000908090904010202030704--