[webkit-reviews] review denied: [Bug 190761] [Win] Add function call name information to stack traces : [Attachment 352824] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Oct 21 20:51:29 PDT 2018


Fujii Hironori <Hironori.Fujii at sony.com> has denied Christopher Reid
<chris.reid at sony.com>'s request for review:
Bug 190761: [Win] Add function call name information to stack traces
https://bugs.webkit.org/show_bug.cgi?id=190761

Attachment 352824: Patch

https://bugs.webkit.org/attachment.cgi?id=352824&action=review




--- Comment #4 from Fujii Hironori <Hironori.Fujii at sony.com> ---
Comment on attachment 352824
  --> https://bugs.webkit.org/attachment.cgi?id=352824
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=352824&action=review

> Source/WTF/wtf/StackTrace.cpp:116
> +    SYMBOL_INFO* symbol =
static_cast<SYMBOL_INFO*>(fastZeroedMalloc(sizeof(SYMBOL_INFO) + MAX_SYM_NAME *
sizeof(TCHAR)));

SYMBOL_INFO* symbol = static_cast<SYMBOL_INFO*>(..)
This is redundant.
auto symbol = static_cast<SYMBOL_INFO*>(..)

I think you don't need to allocate by using fastZeroedMalloc because it is not
so big.

This is not a symbol. The variable name 'symbol' should be renamed. For
example, 'symbolInfo' or 'buffer'.

> Source/WTF/wtf/win/DbgHelperWin.cpp:35
> +// It's possible for external code to call the library at the same time as
webkit and cause memory corruption.

Nit: webkit → WebKit

> Source/WTF/wtf/win/DbgHelperWin.cpp:61
> +bool DbgHelper::SymFromAddress(HANDLE hProc, DWORD64 address, PDWORD64
displacement, PSYMBOL_INFO symbol)

Remove variable names instead of using UNUSED_PARAM.
bool DbgHelper::SymFromAddress(HANDLE, DWORD64, PDWORD64, PSYMBOL_INFO)

> Source/WTF/wtf/win/DbgHelperWin.h:35
> +class DbgHelper {

I think you should define a namespace instead of a class.

> Source/WTF/wtf/win/DbgHelperWin.h:39
> +    static bool SymFromAddress(HANDLE hProc, DWORD64 address, PDWORD64
displacement, PSYMBOL_INFO);

I prefer SYMBOL_INFO*, DWORD64* to PSYMBOL_INFO, PDWORD64 in WebKit.


More information about the webkit-reviews mailing list