Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 48041 invoked from network); 27 Feb 2006 17:24:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 Feb 2006 17:24:02 -0000 Received: (qmail 21259 invoked by uid 500); 27 Feb 2006 17:23:58 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 21202 invoked by uid 500); 27 Feb 2006 17:23:58 -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 21174 invoked by uid 99); 27 Feb 2006 17:23:58 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Feb 2006 09:23:58 -0800 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 [12.17.213.84] (HELO bco-exchange.bco.roguewave.com) (12.17.213.84) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Feb 2006 09:23:57 -0800 Received: from [10.70.3.48] (10.70.3.48 [10.70.3.48]) by bco-exchange.bco.roguewave.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.72) id FQ7J17S4; Mon, 27 Feb 2006 10:23:00 -0700 Message-ID: <44033478.4030705@roguewave.com> Date: Mon, 27 Feb 2006 10:18:48 -0700 From: Andrew Black User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: stdcxx-dev@incubator.apache.org Subject: Re: Testsuite self-test failure on NetBSD 3.0 References: <43FF6F6E.6040305@roguewave.com> <43FF8B02.2000504@roguewave.com> In-Reply-To: <43FF8B02.2000504@roguewave.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N When I build and run the testcase as follows, the assertion fails, seeming to confirm the hypothesis. --Andrew Black td143.testdrive.hp.com> cat > testcase.cpp #include #include namespace __rw { ssize_t __rw_memattr (const void*, size_t, int); } int main () { assert (-1 == __rw::__rw_memattr ((void*)1, 1, -1)); } td143.testdrive.hp.com> gcc -c -I/house/ablackrw/stdcxx/include/ansi -D_RWSTDDEBUG -D_RWSTD_USE_CONFIG -I/tmp/ablackrw/stdcxx-11d/include -I/house/ablackrw/stdcxx/include -pedantic -nostdinc++ -g -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align testcase.cpp td143.testdrive.hp.com> gcc testcase.o -o testcase -L/tmp/ablackrw/stdcxx-11d/lib -lstd11d -lsupc++ -lm td143.testdrive.hp.com> ./testcase assertion "-1 == __rw::__rw_memattr ((void*)1, 1, -1)" failed: file "testcase.cpp", line 9, function "int main()" Abort trap (core dumped) Martin Sebor wrote: > Andrew Black wrote: > >> Greetings all. >> >> While running the different executables in the stdcxx test suite, I >> encountered a segfault executing the printf selftest. The following >> is the backtrace. > > > This might be caused by __rw::__rw_memattr() not detecting that > (char*)1 is not a valid pointer to a character string. A simple > test case to confirm this hypothesis would go something like > this: > > #include > #include > > namespace __rw { > ssize_t __rw_memattr (const void*, size_t, int); > } > > int main () { > assert (-1 == __rw::__rw_memattr ((void*)1, 1, -1)); > } > > Martin