[ET Trac] #2832: possible race condition in LoopControl

Roland Haas trac-noreply at einsteintoolkit.org
Tue Nov 5 10:14:54 CST 2024


#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](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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.einsteintoolkit.org/pipermail/trac/attachments/20241105/b13ada82/attachment.htm>


More information about the Trac mailing list