> What about creating an msan interface DSO for the purposes of satisfying -z > defs? The executable will always be searched first, so the interface DSO > could be empty or full of ud2a.I like the idea. The ideal solution would probably be for the linkers to have a --not-needed command line option that prevents the .so from going in the DT_NEEDED, but one with just stubs is probably fine. Cheers, Rafael
I think we did something in ASan to address this issue. On Wed, Jan 21, 2015 at 8:46 PM, Rafael Espíndola < rafael.espindola at gmail.com> wrote:> > What about creating an msan interface DSO for the purposes of satisfying > -z > > defs? The executable will always be searched first, so the interface DSO > > could be empty or full of ud2a. > > I like the idea. The ideal solution would probably be for the linkers > to have a --not-needed command line option that prevents the .so from > going in the DT_NEEDED, but one with just stubs is probably fine. > > Cheers, > Rafael > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150121/0565b686/attachment.html>
We need to chaise and kill all extra complexity, not add more complexity. Pleeease, try finding another solution that does not involve splitting the run-times even further. -z,defs does not solve any problem other than detecting "missing dependencies on ELF", so let's just not use it with sanitizers. --kcc On Wed, Jan 21, 2015 at 9:46 AM, Rafael Espíndola < rafael.espindola at gmail.com> wrote:> > What about creating an msan interface DSO for the purposes of satisfying > -z > > defs? The executable will always be searched first, so the interface DSO > > could be empty or full of ud2a. > > I like the idea. The ideal solution would probably be for the linkers > to have a --not-needed command line option that prevents the .so from > going in the DT_NEEDED, but one with just stubs is probably fine. > > Cheers, > Rafael >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150121/78a9f4d0/attachment.html>
On 21 January 2015 at 17:06, Kostya Serebryany <kcc at google.com> wrote:> We need to chaise and kill all extra complexity, not add more complexity. > Pleeease, try finding another solution that does not involve splitting the > run-times even further. > > -z,defs does not solve any problem other than detecting "missing > dependencies on ELF", > so let's just not use it with sanitizers.That just moves the complexity to the build system :-( Cheers, Rafael
On Wed, Jan 21, 2015 at 8:46 PM, Rafael Espíndola <rafael.espindola at gmail.com> wrote:>> What about creating an msan interface DSO for the purposes of satisfying -z >> defs? The executable will always be searched first, so the interface DSO >> could be empty or full of ud2a. > > I like the idea. The ideal solution would probably be for the linkers > to have a --not-needed command line option that prevents the .so from > going in the DT_NEEDED, but one with just stubs is probably fine.But then the program would fail to start if the (empty) interface library is not available at runtime library search path. Which is the common situation, unless you install clang as a system-wide compiler. This will create lots of deployment problems.> > Cheers, > Rafael > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
On Thu, Jan 22, 2015 at 2:33 AM, Evgeniy Stepanov <eugenis at google.com> wrote:> On Wed, Jan 21, 2015 at 8:46 PM, Rafael Espíndola > <rafael.espindola at gmail.com> wrote: > >> What about creating an msan interface DSO for the purposes of > satisfying -z > >> defs? The executable will always be searched first, so the interface DSO > >> could be empty or full of ud2a. > > > > I like the idea. The ideal solution would probably be for the linkers > > to have a --not-needed command line option that prevents the .so from > > going in the DT_NEEDED, but one with just stubs is probably fine. > > But then the program would fail to start if the (empty) interface > library is not available at runtime library search path. > Which is the common situation, unless you install clang as a > system-wide compiler. This will create lots of deployment problems.True, but it's only a headache for people using -z defs. I'm surprised there isn't a linker option we can use like '-u __msan_memcpy' to say "yeah, this symbol is undefined, but it's expected to be present at runtime". -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150122/4f49fa02/attachment.html>