__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 not defined on aarch64

Alexander Monakov amonakov@ispras.ru
Fri Jun 30 10:26:00 GMT 2017


On Fri, 30 Jun 2017, Richard Earnshaw (lists) wrote:
> Sorry, but it's *VERY* different.  The options you mention will lead to
> a consisten run-time failure.
> 
> Getting the atomicity wrong will lead to random failures at runtime that
> are almost impossible to track down due the nature of such race
> conditions.  That's simply intolerable.

But our current solution in libatomic:

- may deadlock when atomic op is reentered via a signal frame;

- doesn't synchronize between distinct processes operating on
  atomic objects in shared memory;

  (this can lead to the same failure mode as in your objection btw,
  it might seem to work >99% of time);

- neither limitation appears to be documented in any obvious place.


I'd say what we do now is far more inexcusable.

Alexander



More information about the Gcc-help mailing list