[lldb-dev] About lldbHost
Zachary Turner via lldb-dev
lldb-dev at lists.llvm.org
Tue Feb 21 14:06:55 PST 2017
(Correction: I just double checked and the bug is not present in LLDB)
On Tue, Feb 21, 2017 at 2:05 PM Zachary Turner <zturner at google.com> wrote:
> I bet that's it. The 4 failing tests are:
>
> LLVM-Unit.Support/SupportTests.FileOutputBuffer.Test
> LLVM-Unit.Support/SupportTests.FileSystemTest.FileMapping
> LLVM.DebugInfo/PDB.pdbdump-readwrite.test
> LLVM.DebugInfo/PDB.pdbdump-write.test
>
> All of which appear to be related to writing. It looks like the bug is
> present in LLDB as well, but it just never creates a writable mapping so
> the bug is never encountered.
>
> Thanks!
>
> On Tue, Feb 21, 2017 at 2:02 PM Jim Ingham <jingham at apple.com> wrote:
>
> mman.h, which defines these flags, says:
>
> * The MAP_RESILIENT_* flags can be used when the caller wants to map some
> * possibly unreliable memory and be able to access it safely, possibly
> * getting the wrong contents rather than raising any exception.
> * For safety reasons, such mappings have to be read-only (PROT_READ access
> * only).
> *
> * MAP_RESILIENT_CODESIGN:
> * accessing this mapping will not generate code-signing violations,
> * even if the contents are tainted.
> * MAP_RESILIENT_MEDIA:
> * accessing this mapping will not generate an exception if the
> contents
> * are not available (unreachable removable or remote media, access
> beyond
> * end-of-file, ...). Missing contents will be replaced with zeroes.
> */
>
> Are you trying to use them for read-write access? That's all I can see.
>
> Jim
>
>
> > On Feb 21, 2017, at 1:47 PM, Zachary Turner via lldb-dev <
> lldb-dev at lists.llvm.org> wrote:
> >
> >
> >
> > On Wed, Feb 15, 2017 at 11:02 AM Greg Clayton <gclayton at apple.com>
> wrote:
> >
> > The other thing is on Mac we add new flags to mmap that allow us not to
> crash if the backing store (network mount) goes away. There is also a flag
> that says "if code signature is borked, please still allow me to read the
> file without crashing. That functionality will need to be ported into the
> LLVM code somehow so we don't start crashing again. Previously we would
> crash if someone would do:
> >
> > (lldb) file /tmp/invalid_codesig_app
> >
> > And also if the network mounted share would go away on something that
> was mmap'ed and someone would touch any byte within it. Our version of mmap
> works around this and we need that to be in any version we adopt.
> >
> > Greg
> >
> > Hi Greg,
> >
> > I tried to get a change into LLVM to add these two flags. However, I
> started getting some buildbot failures that only occurred on OSX with the
> error message "The operation is not permitted". Since it was only on OSX,
> and since it mentioned permissions, I suspect that MAP_RESILIENT_CODESIGN
> and MAP_RESILIENT_MEDIA are causing a problem. Do you know what the
> requirements of using these two flags are? And why they might fail?
> >
> > I'm guessing you can reproduce my issue locally by checking out up to
> r295769 and then running "ninja check-llvm". How come LLDB doesn't fail
> but LLVM does when using these flags?
> > _______________________________________________
> > lldb-dev mailing list
> > lldb-dev at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20170221/e91aa81b/attachment-0001.html>
More information about the lldb-dev
mailing list