Mailing List Archive

[master] b8b29be5b vtcp: Ignore EINTR with sanitizers
commit b8b29be5ba4180ff7afb2a332aeb2fa543fd06dc
Author: Dridi Boukelmoune <dridi.boukelmoune@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);
}
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit