libjmmcg  release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
misalign_array< Sz > Struct Template Reference

Create an array that is guaranteed to be mis-aligned. More...

Public Attributes

char misalign
 
char str [Sz]
 

Detailed Description

template<std::size_t Sz>
struct misalign_array< Sz >

Create an array that is guaranteed to be mis-aligned.

Now ASAN reports mis-aligned accesses, [1], which could occur using MOV instructions [2] as in 64-bit mode alignment checking of ring 3 can be enabled. But on Intel & AMD mis-aligned access to memory-operands is not an issue in ring 3, so ubsan is conservative (obeying the Standard).

[1] [2]

Definition at line 162 of file memops.cpp.

Member Data Documentation

◆ misalign

template<std::size_t Sz>
char misalign_array< Sz >::misalign

Definition at line 163 of file memops.cpp.

◆ str

template<std::size_t Sz>
char misalign_array< Sz >::str

Definition at line 164 of file memops.cpp.


The documentation for this struct was generated from the following file: