QProcess/Unix: disable vfork() under ASan
Change-Id: I443cf0c8a76243eead33fffd1768ee771eca2d56 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> (cherry picked from commit 94ec17436cbdab52ed85e15ea197b538541b14ca) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
12b43d3902
commit
4f8b0c7e3e
@ -511,6 +511,10 @@ static QString resolveExecutable(const QString &program)
|
||||
|
||||
static int useForkFlags(const QProcessPrivate::UnixExtras *unixExtras)
|
||||
{
|
||||
#if defined(__SANITIZE_ADDRESS__) || __has_feature(address_sanitizer)
|
||||
// ASan writes to global memory, so we mustn't use vfork().
|
||||
return FFD_USE_FORK;
|
||||
#endif
|
||||
#if defined(Q_OS_LINUX) && !QT_CONFIG(forkfd_pidfd)
|
||||
// some broken environments are known to have problems with the new Linux
|
||||
// API, so we have a way for users to opt-out during configure time (see
|
||||
|
Loading…
x
Reference in New Issue
Block a user