[Webkit-unassigned] [Bug 190761] [Win] Add function call name information to stack traces

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


https://bugs.webkit.org/show_bug.cgi?id=190761

Fujii Hironori <Hironori.Fujii at sony.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #352824|review?                     |review-
              Flags|                            |

--- 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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20181022/fb8955c6/attachment.html>


More information about the webkit-unassigned mailing list