Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 15 Dec 2015 12:00:05 +0100
From: Jens Gustedt <jens.gustedt@...ia.fr>
To: musl@...ts.openwall.com
Subject: Re: stdatomic implementation

Am Sonntag, den 13.12.2015, 15:59 +0100 schrieb Szabolcs Nagy:
> i recently run into a problem that you may be interested in:
> the gcc atomic builtins do not handle atomic pointer types as
> expected.
> 
> T *p;
> __atomic_fetch_add(&p,1);
> 
> adds 1 to (char*)p instead of sizeof(T).
> 
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64843

thanks again for pointing me at this

Since here we can assume that we flat addressing and that we also have
C11's _Generic, a workaround is simple. I have now implemented this,
and as long as one is using my header file and not gcc's it seems to
work.

Jens

-- 
:: INRIA Nancy Grand Est ::: Camus ::::::: ICube/ICPS :::
:: ::::::::::::::: office Strasbourg : +33 368854536   ::
:: :::::::::::::::::::::: gsm France : +33 651400183   ::
:: ::::::::::::::: gsm international : +49 15737185122 ::
:: http://icube-icps.unistra.fr/index.php/Jens_Gustedt ::




Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.