Bug 165075
Summary: | REGRESSION(r200346): WTFLogVerbose is passing arguments to WTFLog incorrectly | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ihor Ivlev <ivlev.igor> |
Component: | Web Template Framework | Assignee: | 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 |
Ihor Ivlev
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:
http://c-faq.com/varargs/handoff.html
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Keith Rollin
WTFLogVerbose is referenced in only one place:
$ rg -w WTFLogVerbose
WTF/wtf/Assertions.cpp
495:void WTFLogVerbose(const char* file, int line, const char* function, WTFLogChannel* channel, const char* format, ...)
WTF/wtf/Assertions.h
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__)
WebCore/platform/NotImplemented.h
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.