Intel's manual mentions that, it may generate exception, wording seems a little bit interesting.
Load 128-bits of integer data from memory into dst. mem_addr must be aligned on a 16-byte boundary or a general-protection exception may be generated.
Here is my sample code, none of the methods did not cause any exception with Debug/Release builds. ※Using Visual Studio 2019
int someMethodHeapAlloc(){
auto allocated = (bool*)_aligned_malloc(32*sizeof(bool), 2);
auto loaded = _mm_load_si128((__m128i*)&allocated[3]); //Here, I expect exception
auto compared = _mm_movemask_epi8(loaded, _mm_setzero_si128());
_aligned_free(allocated);
return compared;
}
int someMethodStackAlloc(){
alignas(2) bool allocated[32]{};
auto loaded = _mm_load_si128((__m128i*)&allocated[3]); //Here, I expect exception
auto compared = _mm_movemask_epi8(loaded, _mm_setzero_si128());
return compared;
}