<div dir="ltr">I bet that's it. The 4 failing tests are:<div><br></div><div><div> LLVM-Unit.Support/SupportTests.FileOutputBuffer.Test</div><div> LLVM-Unit.Support/SupportTests.FileSystemTest.FileMapping</div><div> LLVM.DebugInfo/PDB.pdbdump-readwrite.test</div><div> LLVM.DebugInfo/PDB.pdbdump-write.test</div></div><div><br></div><div>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.</div><div><br></div><div>Thanks!</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Feb 21, 2017 at 2:02 PM Jim Ingham <<a href="mailto:jingham@apple.com">jingham@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">mman.h, which defines these flags, says:<br class="gmail_msg">
<br class="gmail_msg">
* The MAP_RESILIENT_* flags can be used when the caller wants to map some<br class="gmail_msg">
* possibly unreliable memory and be able to access it safely, possibly<br class="gmail_msg">
* getting the wrong contents rather than raising any exception.<br class="gmail_msg">
* For safety reasons, such mappings have to be read-only (PROT_READ access<br class="gmail_msg">
* only).<br class="gmail_msg">
*<br class="gmail_msg">
* MAP_RESILIENT_CODESIGN:<br class="gmail_msg">
* accessing this mapping will not generate code-signing violations,<br class="gmail_msg">
* even if the contents are tainted.<br class="gmail_msg">
* MAP_RESILIENT_MEDIA:<br class="gmail_msg">
* accessing this mapping will not generate an exception if the contents<br class="gmail_msg">
* are not available (unreachable removable or remote media, access beyond<br class="gmail_msg">
* end-of-file, ...). Missing contents will be replaced with zeroes.<br class="gmail_msg">
*/<br class="gmail_msg">
<br class="gmail_msg">
Are you trying to use them for read-write access? That's all I can see.<br class="gmail_msg">
<br class="gmail_msg">
Jim<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
> On Feb 21, 2017, at 1:47 PM, Zachary Turner via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" class="gmail_msg" target="_blank">lldb-dev@lists.llvm.org</a>> wrote:<br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
> On Wed, Feb 15, 2017 at 11:02 AM Greg Clayton <<a href="mailto:gclayton@apple.com" class="gmail_msg" target="_blank">gclayton@apple.com</a>> wrote:<br class="gmail_msg">
><br class="gmail_msg">
> 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:<br class="gmail_msg">
><br class="gmail_msg">
> (lldb) file /tmp/invalid_codesig_app<br class="gmail_msg">
><br class="gmail_msg">
> 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.<br class="gmail_msg">
><br class="gmail_msg">
> Greg<br class="gmail_msg">
><br class="gmail_msg">
> Hi Greg,<br class="gmail_msg">
><br class="gmail_msg">
> 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?<br class="gmail_msg">
><br class="gmail_msg">
> 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?<br class="gmail_msg">
> _______________________________________________<br class="gmail_msg">
> lldb-dev mailing list<br class="gmail_msg">
> <a href="mailto:lldb-dev@lists.llvm.org" class="gmail_msg" target="_blank">lldb-dev@lists.llvm.org</a><br class="gmail_msg">
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div>