SuccessChanges

Summary

  1. [builtins][test] Avoid unportable mmap call in clear_cache_test.c (details)
  2. [FrontendTests] Try again to make test not write an output file (details)
Commit 1876e6c83c7a713de2851af686417892cd717adc by ro
[builtins][test] Avoid unportable mmap call in clear_cache_test.c
Within the last two weeks, the Builtins-*-sunos :: clear_cache_test.c
started to FAIL on Solaris.  Running it under truss shows
  mmap(0x00000000, 128, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_ANON, 0, 0) Err#22 EINVAL
_exit(1)
While there are several possible reasons mmap can return EINVAL on
Solaris, it turns out it's this one (from mmap(2)):
  MAP_ANON  was  specified,  but the file descriptor was not
  -1.
And indeed even the Linux mmap(2) documents this as unportable:
  MAP_ANONYMOUS
         The mapping is not backed by any file; its contents are
initial‐
         ized to zero.  The fd argument is ignored; however, some
imple‐
         mentations require fd to be -1 if MAP_ANONYMOUS (or MAP_ANON)
is
         specified, and portable applications should  ensure  this. 
The
This patch follows this advise.  Tested on x86_64-pc-linux-gnu,
amd64-pc-solaris2.11 and sparcv9-sun-solaris2.11.
Differential Revision: https://reviews.llvm.org/D68455
llvm-svn: 375490
The file was modifiedcompiler-rt/test/builtins/Unit/clear_cache_test.c
Commit ecc999101aadc8dc7d4af9fd88be10fe42674aa0 by benny.kra
[FrontendTests] Try again to make test not write an output file
Setting the output stream to nulls seems to work.
llvm-svn: 375491
The file was modifiedclang/unittests/Frontend/OutputStreamTest.cpp