[master] b8b29be5b vtcp: Ignore EINTR with sanitizers

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Thu Apr 15 17:11:06 UTC 2021


commit b8b29be5ba4180ff7afb2a332aeb2fa543fd06dc
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 4c99beac1..9de0389f2 100644
--- a/lib/libvarnish/vtcp.c
+++ b/lib/libvarnish/vtcp.c
@@ -628,6 +628,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