Open GoogleCodeExporter opened 9 years ago
I think this is a fantastic idea!
The location at which DLLs are looked up on Windows is documented here:
<http://msdn.microsoft.com/en-us/library/windows/desktop/ms682586%28v=vs.85%29.a
spx>. The only way that I'm aware of that you could alter that search order by
embedding something in the binaries is through embedding a manifest as a
resource, but that gets a bit tricky if the application already has a manifest.
There is a tool called mt.exe
<http://msdn.microsoft.com/en-us/library/aa375649%28v=vs.85%29.aspx> which is
apparently capable of extracting a manifest from one binary, merge another
manifest inside it, and put it back into the binary (see the -updateresource
and -manifest arguments).
Honestly I don't think this trouble is worth it, because it will only work for
the cases where you invoke the linker through the compiler (which some code
bases such as Mozilla don't) and Reid's suggestion basically means that you can
get a working asan build no matter what your binaries setup looks like by
adding -fsanitize=address and copying one DLL alongside the app, and that is a
*huge* improvement over the existing setup. If that is the best we can
achieve, I would be happy!
Original comment by ehsan.ak...@gmail.com
on 8 Aug 2014 at 2:35
Do you mean that the user has to do the copying manually?
Original comment by timurrrr@google.com
on 8 Aug 2014 at 2:48
Well hopefully by modifying their build system, but yes. Typically it's very
easy to copy additional resources next to the binary in various build systems.
Original comment by ehsan.ak...@gmail.com
on 8 Aug 2014 at 2:50
I assume if a user wants to compile something simple (like "hello, world") as a
simple clang-cl command (clang-cl -fsanitize=address hello.c && hello.exe),
clang-cl will copy the RTL?
Original comment by timurrrr@google.com
on 8 Aug 2014 at 3:16
Sure, we can definitely try copying the DLL from the driver driver if we choose
to invoke link.exe. That sounds fine to me.
Original comment by ehsan.ak...@gmail.com
on 8 Aug 2014 at 3:29
Reid, any opinions?
Original comment by timurrrr@google.com
on 8 Aug 2014 at 4:58
Original comment by ramosian.glider@gmail.com
on 30 Jul 2015 at 9:05
Adding Project:AddressSanitizer as part of GitHub migration.
Original comment by ramosian.glider@gmail.com
on 30 Jul 2015 at 9:06
Original issue reported on code.google.com by
timurrrr@google.com
on 8 Aug 2014 at 1:58