[6.0] 727b4dedd vtcp: Ignore EINTR with sanitizers

Reza Naghibi reza at naghibi.com
Wed Apr 28 18:19:08 UTC 2021


commit 727b4deddf92c36823ab77545d0f8b430f397226
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Thu Apr 15 19:07:34 2021 +0200

    vtcp: Ignore EINTR with sanitizers
    
    Technically it can also happen with a debugger attached to a process
    despite SA_RESTART.

diff --git a/lib/libvarnish/vtcp.c b/lib/libvarnish/vtcp.c
index 89450c52e..b55d91341 100644
--- a/lib/libvarnish/vtcp.c
+++ b/lib/libvarnish/vtcp.c
@@ -600,6 +600,10 @@ VTCP_Check(ssize_t a)
 	 */
 	if (errno == EINVAL)
 		return (1);
+#endif
+#if (defined(__SANITIZER) || __has_feature(address_sanitizer))
+	if (errno == EINTR)
+		return (1);
 #endif
 	return (0);
 }


More information about the varnish-commit mailing list