[PATCH] D33600: Adjust sanitizers for FreeBSD 64-bit inode update

Dimitry Andric via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 26 15:40:08 PDT 2017


dim added a comment.

In https://reviews.llvm.org/D33600#766133, @vitalybuka wrote:

> Do we have public build bot for FreeBSD?


No, unfortunately the one that used to exist has disappeared a long time ago. I cannot provide one myself, so I will see if there is something to be done in the FreeBSD infrastructure.



================
Comment at: lib/sanitizer_common/sanitizer_linux.cc:240
 #if SANITIZER_FREEBSD
-  return internal_syscall(SYSCALL(stat), path, buf);
+  return internal_syscall(SYSCALL(fstatat), AT_FDCWD, (uptr)path,
+                          (uptr)buf, 0);
----------------
vitalybuka wrote:
> Is this going to work for older versions?
The `fstatat` syscall was added in 2008, in FreeBSD 8.0.  That particular version is now unsupported for ~7 years, so it is safe to assume the syscall exists in any recent (and usable) version of FreeBSD. :)

The `getdirentries` syscall used below is much older, even.


https://reviews.llvm.org/D33600





More information about the llvm-commits mailing list