any way to stop unaligned access from c++ standard library on x86_64?
问题 I am trying to check for any unaligned reads in my program. I enable unaligned access processor exception via (using x86_64 on g++ on linux kernel 3.19): asm volatile("pushf \n" "pop %%rax \n" "or $0x40000, %%rax \n" "push %%rax \n" "popf \n" ::: "rax"); I do an optional forced unaligned read which triggers the exception so i know its working. After i disable that I get an error in a piece of code which otherwise seems fine : char fullpath[eMaxPath]; snprintf(fullpath, eMaxPath, "%s/%s",