GCC: (GNU) 4.9.x-google 20140827 (prerelease). The problem with alignment (address sanitize)?

Good day to all. Please explain the following point about the alignment and other features in different versions of GCC 4.7, 4.8, 4.9.x with different clang. Describe the problem simply, have a project, say it's Unix-based OS compiled from source using GCC: (GNU) 4.9.x-google 20140827 (prerelease) clang version 3.6. Ie all OS binaries are collected using the same specified version of the compiler. The OS uses a "third party binaries", for example, a separate library of video processing, etc. For simplicity of the example we assume that it is libvideo.so that there are different versions. Now, notice the next feature, not all versions of libvideo.so collected by different compilers for this OS work correctly.

For example:

1. libvideo.so - (GNU) 4.6.x-google 20120106 (prerelease) - works.
2. libvideo.so - GCC: (GNU) 4.7 - works.
3. libvideo.so - GCC: (GNU) 4.8 - works.
4. libvideo.so - GCC: (GNU) 4.9.x-google 20140827 (prerelease) clang version 3.6 - not working. Crash'i GSI in libc.

This naturally assumes that the bitness of the platform for which collected libvideo.so coincide. In the latter case, it seems that the library has the same compiler and OS, but it just doesn't work, crashes somewhere in the bowels of libc.so. I read that starting with a specific version of GCC (or clang) is the support of a certain "aligment support", which may be the cause. Can someone explain in a little more detail that has changed dramatically with alignment on the version of GCC 4.9.x and why the binaries are collected by different versions of GCC can be "incompatible"? It was found experimentally that all versions of libvideo.so collected to GCC 4.8 is guaranteed to work. But after depends on the compiler version, and other yet unknown to me factors.

What's so radically changed in GCC after 4.8, which can lead to such behavior? (Yes, library libvideo.so a third-party, i.e. comes in the form of binaries, to compile it from source not possible).
August 23rd 19 at 10:32
0 answer

Find more questions by tags ProgrammingTranslators