From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12858 invoked by alias); 5 May 2002 23:51:26 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 12839 invoked from network); 5 May 2002 23:51:25 -0000 Received: from unknown (HELO mail.riotinto.com.au) (57.70.13.254) by sources.redhat.com with SMTP; 5 May 2002 23:51:25 -0000 Received: from corehub1.ex.riotinto.org ([203.3.63.116]) by mail.riotinto.com.au with Microsoft SMTPSVC(5.0.2195.4821); Mon, 6 May 2002 09:50:44 +1000 Received: from tbspmail.corp.riotinto.org ([192.207.121.96]) by corehub1.ex.riotinto.org with Microsoft SMTPSVC(5.0.2195.4821); Mon, 6 May 2002 09:50:35 +1000 Received: from crtsmail.corp.riotinto.org ([203.4.72.10]) by tbspmail.corp.riotinto.org with Microsoft SMTPSVC(5.0.2195.2966); Mon, 6 May 2002 07:50:33 +0800 X-MimeOLE: Produced By Microsoft Exchange V6.0.5762.3 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: Object alignment, was: cygwin failures - assertion "!(addr & FLAGS)" failed: Date: Sun, 05 May 2002 16:51:00 -0000 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Billinghurst, David (CRTS)" To: Cc: X-OriginalArrivalTime: 05 May 2002 23:50:33.0492 (UTC) FILETIME=[A55CFD40:01C1F48F] X-SW-Source: 2002-05/txt/msg00275.txt.bz2 cygwin readers: This is about porting java to cygwin for gcc-3.2 (and perhaps gcc-3.1.1 if the changes are small). So we need objects to be 8-byte aligned so that the low three bits of the address are 0? Are there any ways around this, as I don't=20 think that this is the default on cygwin.=20=20 I seem to recall that: - objects are only 4-byte aligned by default.=20=20 - it is necessary to rebuild ld to ensure 8-byte alignment - there are performance benefits for 8-byte (or even 16-byte) alignment, but arguements against. There is much discussion over a long period in the cygwin archives, which I will obviously have to re-read in the next little while. -----Original Message----- From: Tom Tromey [mailto:tromey@redhat.com] Sent: Saturday, 4 May 2002 6:31=20 To: Billinghurst, David (CRTS) Cc: java@gcc.gnu.org Subject: Re: cygwin failures - assertion "!(addr & FLAGS)" failed: >>>>> "David" =3D=3D Billinghurst, David (CRTS) writes: David> At last a real bug in the cygwin libjava testsuite. Most of the=20 David> compilation tests pass, but all (that I could find) executable=20 David> tests fail with=20 David> assertion "!(addr & FLAGS)" failed: file "/usr/local/src/gcc3.1/libj= ava/java/lang/natObject.cc", line 772 My understanding is that we use the lowest 3 bits to keep some information about the thin locks. If this assertion fails, it means that we've found an object which isn't suitably aligned. I think this can mean one of two things: 1. There is a bug in the allocator (unlikely), or 2. The compiler isn't properly aligning an object which it lays out statically. For instance this could happen with some Class object A bug along these lines was fixed pretty recently: 2002-04-18 Bryce McKinlay * class.c (make_class_data): Set DECL_ALIGN on static class data, for hash synchronization. * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects. * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for class_type_node. If you already have this patch then I guess there's another such bug :-( Tom -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/