From owner-freebsd-arch@FreeBSD.ORG Tue Sep 18 21:18:20 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B0B8A106566B for ; Tue, 18 Sep 2012 21:18:20 +0000 (UTC) (envelope-from jroberson@jroberson.net) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 7A7B88FC0A for ; Tue, 18 Sep 2012 21:18:20 +0000 (UTC) Received: by pbbrp2 with SMTP id rp2so997097pbb.13 for ; Tue, 18 Sep 2012 14:18:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:x-x-sender:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version:content-type:x-gm-message-state; bh=kJ0sDoqmN6FZMlkZI3fiaFgwTuAsuDRfGnho+ayEClw=; b=N3O+YDu2SrCd9Ct5mrmUSPFRm5Lt2JHUeMZm4K9Uc+KEK4k6oy/YnJmW3xB2vxPVUW IeLVzbGMMb6IMMripceD7iUW53ONeWNYLB1scWvYw0A7+n6cpGtEaM6hXK65p0yINU45 eLUW89zRUQ4llsnT7l160zDu9YdcxWvHEQemLaIgiLuwu77hDOk/FpNBP5Pu3ndU1xXl /+GgVW6OpvpM7helCQ/KjbW/LF0CcYBuoZyGUo9fEokvoHqy0G89TpxNjQ5rZwJoCS1H WEsnS5jCpJDuUUmLXcTHqZHy882e75SsailzzI7f8gJdrfzTNd9nOScisUlR5YHA3agg OcmQ== Received: by 10.68.233.97 with SMTP id tv1mr1877538pbc.96.1348003099896; Tue, 18 Sep 2012 14:18:19 -0700 (PDT) Received: from rrcs-66-91-135-210.west.biz.rr.com (rrcs-66-91-135-210.west.biz.rr.com. [66.91.135.210]) by mx.google.com with ESMTPS id tw5sm552366pbc.48.2012.09.18.14.18.17 (version=SSLv3 cipher=OTHER); Tue, 18 Sep 2012 14:18:19 -0700 (PDT) Date: Tue, 18 Sep 2012 11:17:49 -1000 (HST) From: Jeff Roberson X-X-Sender: jroberson@desktop To: Poul-Henning Kamp In-Reply-To: <23196.1347999426@critter.freebsd.dk> Message-ID: References: <23196.1347999426@critter.freebsd.dk> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Gm-Message-State: ALoCoQkG8oNMu2OikTStTqanxDCOhndiIx8tAMAghBBwkIgSaqyNGCkzSIl5QgNu3Ri4BwqNdzSG Cc: Konstantin Belousov , attilio@freebsd.org, freebsd-arch@freebsd.org, arch@freebsd.org Subject: Re: Aliasing issue with TAILQ on ppc64 ? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2012 21:18:20 -0000 On Tue, 18 Sep 2012, Poul-Henning Kamp wrote: > In message , Jeff Roberson writes: > >> If you compile at low optimization levels I assume it goes away? > > I don't have access to the machine at this time, and in general > I'm not particular focused on PPC64, since this is a general > problem on any architecture, as I understand the C-language rules. Have you verified that it actually happens on other architectures? It may be a bug only in the ppc backend and not in bsd code. > >> Can you place asm volatile ("" ::: "memory"); between the two tailq macros >> with the same optimization level? > > I tried earlier to put a printf("FOO") there, and that fixed it, which > I why I diagnosed it as an aliasing issue in the first place. I suggest this approach to further narrow the scope of the issue. Jeff > > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk@FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetence. >