1
This small wrapper has for goal to workaround issues with some programs
2
calling memcpy() with source and destination overlap, causing issues on
3
recent GNU libc versions, which might copy memory backward on some
4
x86-64 CPU. For more details, see
5
http://sourceware.org/bugzilla/show_bug.cgi?id=12518
7
The wrapper is built in two versions, memcpy-preload.so for "production"
8
usage, which just fix the wrong call by using memmove, and
9
memcpy-syslog-preload.so for "debugging" purposes which also logs the
10
issue through syslog (rate limited).
12
To use them for a specific binary, you can use the LD_PRELOAD
14
LD_PRELOAD=./memcpy-preload.so /path/to/binary
15
LD_PRELOAD=./memcpy-syslog-preload.so /path/to/binary
17
For system-wide usage, it is possible to add this wrapper in