problems with __sync_add_and_fetch in BPF code

Pablo Alvarez

Hi all,

A while ago, I filed a bug with LLVM about __sync_add_and_fetch as compiled into eBPF code.

Both it and __sync_fetch_and_add fail to return the correct value of the item being incremented, returning instead the increment (or double the increment). This means I end up with race conditions. Has anyone else run into this, and do you have a workaround for it?

The bug report, sadly, has not been touched by anyone else.


Pablo Alvarez

Join to automatically receive all group messages.