[PATCH] D87381: [LLD][PowerPC][test] Update thunk range error report for PPC64PCRelLongBranchThunk

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 18 05:53:41 PDT 2020


nemanjai accepted this revision.
nemanjai added a comment.
This revision is now accepted and ready to land.

This LGTM but of course, wait to hear from @MaskRay because he had test case concerns.



================
Comment at: lld/test/ELF/ppc64-pcrel-call-to-toc-error.s:1
+# REQUIRES: ppc, system-linux
+# RUN: echo 'SECTIONS { \
----------------
MaskRay wrote:
> Delete system-linux
> 
> I think this test is portable and runs on other systems.
It appears that the file systems on FreeBSD and Linux behave differently. On Linux, writing the large file (8GB in this case) happens in a fraction of a second which suggests that it is not actually writing the bytes to storage. However, on FreeBSD this takes a significant amount of time - perhaps it is actually writing the bytes to storage. So we limit these test cases that produce large files to Linux to avoid this problem.

The issue can be avoided on FreeBSD by writing out to `/dev/null` or some other special file because that won't `mmap` - it creates a memory buffer. However, that causes a different problem on systems that limit virtual memory - the OS won't allow the process to allocate a memory buffer that size.

So the easiest solution we found was to write to a real file and limit this to Linux.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87381/new/

https://reviews.llvm.org/D87381



More information about the llvm-commits mailing list