Return-Path: Delivered-To: apmail-stdcxx-dev-archive@www.apache.org Received: (qmail 12935 invoked from network); 31 Mar 2008 03:18:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Mar 2008 03:18:35 -0000 Received: (qmail 38709 invoked by uid 500); 31 Mar 2008 03:18:35 -0000 Delivered-To: apmail-stdcxx-dev-archive@stdcxx.apache.org Received: (qmail 38693 invoked by uid 500); 31 Mar 2008 03:18:35 -0000 Mailing-List: contact dev-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list dev@stdcxx.apache.org Received: (qmail 38684 invoked by uid 99); 31 Mar 2008 03:18:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Mar 2008 20:18:35 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of msebor@gmail.com designates 209.85.200.168 as permitted sender) Received: from [209.85.200.168] (HELO wf-out-1314.google.com) (209.85.200.168) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Mar 2008 03:17:53 +0000 Received: by wf-out-1314.google.com with SMTP id 27so1479038wfd.2 for ; Sun, 30 Mar 2008 20:18:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:organization:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; bh=a3d7Z7K81yPTFaLsASEplkC4jHVxnJyXiLD9f0amiI8=; b=upuaYOnyb0VgH6TpE/mnS94clFUgmVJdWoVlL77WVrQJezGzYjli6QudCIUzM5ldFuDhZbs8jcqqIJj0l1jzd2nbGH59tBDQ1UC1QcCK05UkuI+UCq7IOvwCJSNrSYduPl8AlAoei0ouqFKFmNGnPFlHV/vwLBCY6zrI8BYn6yA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:organization:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=mVeO5p/6VimGmeIFllmPjEgKqXzDr9UcinAcZCHdup4V64oF9SfYCvT6i9YhLelS2FeW21y9JMmvgFykL2xFUSl7zzVvWWhQiET9irlJj0yTmZ+zDc5meK5/fSNQpoOPHt/qOPN8m6sCkQDlOQNKuHZYkHY7IebHaj+yQScoJCE= Received: by 10.142.114.15 with SMTP id m15mr3333181wfc.235.1206933482611; Sun, 30 Mar 2008 20:18:02 -0700 (PDT) Received: from localhost.localdomain ( [71.229.200.170]) by mx.google.com with ESMTPS id 30sm7383376wfc.6.2008.03.30.20.18.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 30 Mar 2008 20:18:01 -0700 (PDT) Message-ID: <47F057E7.4020206@roguewave.com> Date: Sun, 30 Mar 2008 21:17:59 -0600 From: Martin Sebor Organization: Rogue Wave Software, Inc. User-Agent: Thunderbird 2.0.0.12 (X11/20080226) MIME-Version: 1.0 To: dev@stdcxx.apache.org Subject: Re: [STDCXX-709] ContainerData ctor and UserClass::from_char() References: <47E42941.8040704@roguewave.com> <47E44038.5090404@roguewave.com> <47E82005.50006@roguewave.com> <47E9BBD7.4060606@roguewave.com> <47E9D7CD.9060003@roguewave.com> <47EACBE8.7040204@roguewave.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: Martin Sebor X-Virus-Checked: Checked by ClamAV on apache.org Eric Lemings wrote: > > >> -----Original Message----- >> From: Eric Lemings >> Sent: Thursday, March 27, 2008 2:05 PM >> To: 'dev@stdcxx.apache.org' >> Subject: RE: [STDCXX-709] ContainerData ctor and >> UserClass::from_char() >> >> >> >>> -----Original Message----- >>> From: Martin Sebor [mailto:sebor@roguewave.com] >>> Sent: Wednesday, March 26, 2008 4:19 PM >>> To: dev@stdcxx.apache.org >>> Subject: Re: [STDCXX-709] ContainerData ctor and >>> UserClass::from_char() >>> >> ... >>> It seems pretty clear that somewhere between the call TO >>> operator new and the return FROM the function the pointer >>> gets bumped up by 8 on LP64 (and 4 on ILP32 according to >>> your observation). The only thing in between these two >>> steps is the call to the UserClass ctor. So unless the >>> ctor manages to change its own this pointer we're looking >>> as a compiler bug. Either way, we need a small, isolated >>> test case to understand how to deal with it... >>> >>> Martin >> The pointer is being adjusted before the constructor is >> called. >> >> I was looking yesterday at GCC's implementation of the >> C++ ABI __cxa_vec_new2() function. There's a padding >> argument that may be utilized in HP-UX aCC 6.x for some >> unknown reason. >> >> Also, I thought the allocator in _rw_dispatch(), where >> the ContainerTestCaseData object is being constructed, >> could play some role in all this but looks like its >> only used in the test function. >> >> Brad. > > Does HP-UX IPF have any sort of memory alignment restrictions > that anyone is aware of? Usually, the preferred (required on some systems) alignment of a built-in type corresponds to the type's size. According to HP, int and float are 4-byte aligned, and doubles are 8 byte aligned: http://www.docs.hp.com/en/1552/comp_run.html#RN.CVT.NN100 AFAICT, malloc() returns pointers aligned on the 8-byte boundary. Martin