info.checksum = zend_adler32(ADLER32_INIT, buf, script->size);
info.checksum = zend_adler32(info.checksum, (unsigned char*)ZSTR_VAL((zend_string*)ZCG(mem)), info.str_size);
+#if __has_feature(memory_sanitizer)
+ /* The buffer may contain uninitialized regions. However, the uninitialized parts will not be
+ * used when reading the cache. We should probably still try to get things fully initialized
+ * for reproducibility, but for now ignore this issue. */
+ __msan_unpoison(&info, sizeof(info));
+ __msan_unpoison(buf, script->size);
+#endif
+
#ifdef HAVE_SYS_UIO_H
- vec[0].iov_base = &info;
+ vec[0].iov_base = (void *)&info;
vec[0].iov_len = sizeof(info);
vec[1].iov_base = buf;
vec[1].iov_len = script->size;