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@lists.llvm.org> wrote: > > > > On Wed, Feb 15, 2017 at 11:02 AM Greg Clayton <gclay...@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@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev _______________________________________________ lldb-dev mailing list lldb-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev