#2832: possible race condition in LoopControl
Reporter:Roland Haas
Status:new
Milestone:
Version:
Type:bug
Priority:major
Component:

Comment (by Roland Haas):

There’s alignas since C++11: https://en.cppreference.com/w/cpp/language/alignas though this may not be any different from CCTK_ATTRIBUTE_ALIGN and indeed

#include <vector>

struct alignas(128) aligned_t {
  volatile int foo;
};

std::vector<aligned_t> test_aligned_vector;
aligned_t *aligned;

void foo() {
  aligned = new aligned_t();
}

gives the same warning when compiled with g++ -std=gnu++11 -c -Wall (only warns about new not about std::vector but I suspect that std::vector also does not align and only hides the issue because it internally uses a void* pointer for its storage).

--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2832/possible-race-condition-in-loopcontrol