From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26486 invoked by alias); 7 Oct 2011 15:06:19 -0000 Received: (qmail 26401 invoked by uid 22791); 7 Oct 2011 15:06:18 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay01.alfahosting-server.de (HELO relay01.alfahosting-server.de) (80.86.191.88) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 07 Oct 2011 15:05:57 +0000 Received: by relay01.alfahosting-server.de (Postfix, from userid 1001) id C08A132C017D; Fri, 7 Oct 2011 17:05:55 +0200 (CEST) X-Spam-DCC: : Received: from alfa3018.alfahosting-server.de (alfa3018.alfahosting-server.de [82.197.146.36]) by relay01.alfahosting-server.de (Postfix) with ESMTP id 69DEB32C019D for ; Fri, 7 Oct 2011 17:05:51 +0200 (CEST) Received: from laabs.hf.ifn.et.tu-dresden.de (unknown [141.30.128.185]) by alfa3018.alfahosting-server.de (Postfix) with ESMTPSA id 62129515D62B for ; Fri, 7 Oct 2011 17:05:51 +0200 (CEST) Message-ID: <4E8F15B5.6060909@mailbox.tu-dresden.de> Date: Fri, 07 Oct 2011 15:06:00 -0000 From: Martin Laabs Reply-To: uni@martinlaabs.de User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111004 Thunderbird/7.0.1 MIME-Version: 1.0 To: eCos Developer List Subject: Re: Configtool segfaults References: <4E8C5768.8090804@mailbox.tu-dresden.de> In-Reply-To: <4E8C5768.8090804@mailbox.tu-dresden.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checker-Version: clamassassin 1.2.4 with ClamAV 0.97.2/13760/Fri Oct 7 02:58:24 2011 X-IsSubscribed: yes Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2011-10/txt/msg00001.txt.bz2 Hello, I compiled the configtool on my amd64 system (freebsd). After changing some int* casts to intptr_t compiling the configtool worked. (Any interests in the diff?) However - starting the configtool out of a long directory lead to a segfault. I traced down the problem to the String::vFormat function void String::vFormat(LPCTSTR pszFormat, va_list marker) { for(int nLength=100;nLength;) { TCHAR *buf=new TCHAR[1+nLength]; int n=_vsntprintf(buf, nLength, pszFormat, marker ); if(-1==n){ nLength*=2; // NT behavior } else if (n