Bug 165075

Summary: REGRESSION(r200346): WTFLogVerbose is passing arguments to WTFLog incorrectly
Product: WebKit Reporter: Ihor Ivlev <ivlev.igor>
Component: Web Template FrameworkAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: achristensen, ap, beidson, ivlev.igor, krollin
Priority: P2    
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
URL: https://github.com/WebKit/webkit/blob/master/Source/WTF/wtf/Assertions.cpp#L495

Description Ihor Ivlev 2016-11-26 04:06:24 PST
WTFLogVerbose is a variadic function.
It is trying to pass argument list to another variadic function, WTFLog.
*This is not possible* (leads to output corruption), we may consider using a variadic macro or a function that takes va_args instead.
Explanation why this is not possible:
Comment 1 Keith Rollin 2017-01-30 12:06:16 PST
WTFLogVerbose is referenced in only one place:

$ rg -w WTFLogVerbose
495:void WTFLogVerbose(const char* file, int line, const char* function, WTFLogChannel* channel, const char* format, ...)

175:WTF_EXPORT_PRIVATE void WTFLogVerbose(const char* file, int line, const char* function, WTFLogChannel*, const char* format, ...) WTF_ATTRIBUTE_PRINTF(5, 6);
407:#define LOG_VERBOSE(channel, ...) WTFLogVerbose(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, &LOG_CHANNEL(channel), __VA_ARGS__)

48:            WTFLogVerbose(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, WebCore::notImplementedLoggingChannel(), "UNIMPLEMENTED: "); \

However, this "one place" is the definition of the notImplemented macro, which is used in about 763 places.

As indicated by the title, this issue is related to Bug 157274.