Aliasing issue with TAILQ on ppc64 ?

Jeff Roberson jroberson at jroberson.net
Tue Sep 18 21:18:20 UTC 2012


On Tue, 18 Sep 2012, Poul-Henning Kamp wrote:

> In message <alpine.BSF.2.00.1209180858190.47770 at desktop>, 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 at 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.
>


More information about the freebsd-arch mailing list