Closed YuanchengJiang closed 1 week ago
can't reproduce (finally can when having it) and do not really get it, the pointed function memset the whole thing
// xml2 2.9.13
xmlParserCtxtPtr
xmlNewParserCtxt(void)
{
xmlParserCtxtPtr ctxt;
ctxt = (xmlParserCtxtPtr) xmlMalloc(sizeof(xmlParserCtxt));
if (ctxt == NULL) {
xmlErrMemory(NULL, "cannot allocate parser context\n");
return(NULL);
}
memset(ctxt, 0, sizeof(xmlParserCtxt));
if (xmlInitParserCtxt(ctxt) < 0) {
xmlFreeParserCtxt(ctxt);
return(NULL);
}
return(ctxt);
}
but maybe I misread.
Wondering if we care about MSan errors?
We do to some extents, some are genuine but we do get more false positives than with other sanitizers.
I can check this tonight. @YuanchengJiang this may be a false positive. MSAN instruments code, but if you use the system libraries the instrumentation is missing for those libraries. Checking for uninit memory is better done with Valgrind or by recompiling the libraries under MSAN.
I can check this tonight. @YuanchengJiang this may be a false positive. MSAN instruments code, but if you use the system libraries the instrumentation is missing for those libraries. Checking for uninit memory is better done with Valgrind or by recompiling the libraries under MSAN.
I see. Thanks
This is a false positive, testing on Valgrind or libxml+MSAN reports no issue. Also looking at the code it seems the memory is properly initialized. Closing as invalid.
Description
The following code:
Resulted in this output:
Wondering if we care about MSan errors?
PHP Version
PHP 8.4.0-dev
Operating System
ubuntu 22.04