forked from OSchip/llvm-project
On FreeBSD, skip the first entry in the dl_iterate_phdr list.
Summary: Similar to NetBSD, in FreeBSD, the first returned entry when callbacks are done via dl_iterate_phdr will return the main program. Ignore that entry when checking that the dynamic ASan lib is loaded first. Reviewers: eugenis, krytarowski, emaste, joerg Reviewed By: eugenis, krytarowski Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D39253 llvm-svn: 316487
This commit is contained in:
parent
51f604ce66
commit
95af9e654f
|
@ -105,7 +105,7 @@ static int FindFirstDSOCallback(struct dl_phdr_info *info, size_t size,
|
|||
if (internal_strncmp(info->dlpi_name, "linux-", sizeof("linux-") - 1) == 0)
|
||||
return 0;
|
||||
|
||||
#if SANITIZER_NETBSD
|
||||
#if SANITIZER_FREEBSD || SANITIZER_NETBSD
|
||||
// Ignore first entry (the main program)
|
||||
char **p = (char **)data;
|
||||
if (!(*p)) {
|
||||
|
|
Loading…
Reference in New Issue