Bug 295960

Summary: WebCore::XMLMalloc::free() calls itself when xmlFree() is defined to call libmalloc free()
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: New BugsAssignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: REOPENED    
Severity: Normal CC: commit-queue, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=295946
Bug Depends on: 296005    
Bug Blocks:    

David Kilzer (:ddkilzer)
Reported 2025-07-14 22:53:30 PDT
WebCore::XMLMalloc::free() calls itself when xmlFree() is defined to call libmalloc free(). After libxml2 was updated to deprecate its custom allocator functions, xmlFree() was changed to a macro that calls free() instead. However, due to the way WebCore::XMLMalloc::free() is defined, the compiler thought it would call itself via infinite recursion: > All paths through this function will call itself > XMLDocumentParserLibxml2.cpp:122 <rdar://155844722>
Attachments
David Kilzer (:ddkilzer)
Comment 1 2025-07-14 22:57:12 PDT
EWS
Comment 2 2025-07-14 23:10:39 PDT
Committed 297381@main (e4ffdc6cd723): <https://commits.webkit.org/297381@main> Reviewed commits have been landed. Closing PR #48032 and removing active labels.
WebKit Commit Bot
Comment 3 2025-07-15 13:53:22 PDT
Re-opened since this is blocked by bug 296005
Note You need to log in before you can comment on or make changes to this bug.