> It's similar to why, on Linux/Unix, it's bad practice to include "." in your PATH (or LD_LIBRARY_PATH).
An even trickier problem on Linux is that an empty component in the LD_LIBRARY_PATH is interpreted as a reference to the cwd. Many tools come with launcher scripts that do something like:
export LD_LIBRARY_PATH=/usr/local/lib/my-app-1.0:${LD_LIBRARY_PATH}
/usr/local/bin/my-app-1.0
... and bam, now if $LD_LIBRARY_PATH was empty (which it usually is) you've unintentionally added the cwd to it. This problem is fairly common in practice.
FWIW, the correct way to set the variable is:
export LD_LIBRARY_PATH=/usr/local/lib/my-app-1.0${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
(or make sure the binary has a DT_RUNPATH entry that points to the library directory, so you don't have to mess around with environmental variables at all.)