Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 93448 invoked from network); 27 Feb 2006 18:44:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 Feb 2006 18:44:31 -0000 Received: (qmail 20097 invoked by uid 500); 27 Feb 2006 18:44:31 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 20079 invoked by uid 500); 27 Feb 2006 18:44:30 -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 20068 invoked by uid 99); 27 Feb 2006 18:44:30 -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 10:44:30 -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 10:44:30 -0800 Received: from [10.70.3.113] (10.70.3.113 [10.70.3.113]) by bco-exchange.bco.roguewave.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.72) id FQ7J1793; Mon, 27 Feb 2006 11:43:33 -0700 Message-ID: <44034981.9080205@roguewave.com> Date: Mon, 27 Feb 2006 11:48:33 -0700 From: Martin Sebor User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050920 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> <44033478.4030705@roguewave.com> In-Reply-To: <44033478.4030705@roguewave.com> Content-Type: text/plain; charset=us-ascii; 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 Andrew Black wrote: > When I build and run the testcase as follows, the assertion fails, > seeming to confirm the hypothesis. Okay, thanks. I'll open an issue for this bug. The next step is to figure out what call to use on BSD instead of madvise() to detect invalid pointers. It might also be that the behavior we're seeing is a BSD bug in which case we should report it to the project maintainers. Martin > > --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 > >