File tree 2 files changed +14
-2
lines changed 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,14 @@ struct _WSAMSG {
60
60
#define MAX_USER_BUFF_SIZE ((size_t)(100*1024*1024))
61
61
#define DEFAULT_BUFF_SIZE 8192
62
62
63
+ /* The CMSG_DATA macro does pointer arithmetics on NULL which triggers errors in the Clang UBSAN build */
64
+ #ifdef __linux__
65
+ # if __has_feature (address_sanitizer )
66
+ # undef CMSG_DATA
67
+ # define CMSG_DATA (cmsg ) ((unsigned char *) ((uintptr_t) (cmsg) + sizeof(struct cmsghdr)))
68
+ # endif
69
+ #endif
70
+
63
71
struct _ser_context {
64
72
HashTable params ; /* stores pointers; has to be first */
65
73
struct err_s err ;
Original file line number Diff line number Diff line change 76
76
77
77
ZEND_DECLARE_MODULE_GLOBALS (sockets )
78
78
79
- #ifndef SUN_LEN
80
- #define SUN_LEN (su ) (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
79
+ /* The SUN_LEN macro does pointer arithmetics on NULL which triggers errors in the Clang UBSAN build */
80
+ #ifdef __linux__
81
+ # if __has_feature (address_sanitizer )
82
+ # undef SUN_LEN
83
+ # define SUN_LEN (su ) (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
84
+ # endif
81
85
#endif
82
86
83
87
#ifndef PF_INET
You can’t perform that action at this time.
0 commit comments