commit | 0ff178d157b08717ac405502ad648e6f7bfecd1d | [log] [tgz] |
---|---|---|
author | etienneb <etienneb@chromium.org> | Thu Apr 20 19:58:02 2017 |
committer | Commit bot <commit-bot@chromium.org> | Thu Apr 20 19:58:02 2017 |
tree | a586882431c0c9bc80fe79cc0329e5d2de9d6ef1 | |
parent | 79743d6711cd3e10938f7a7fb057dd065dca3822 [diff] |
Fix potential missing nul character on resolved symbol names The symbol name returned by SymFromName may not contains a NUL character when the symbol name is exactly the size of the buffer. It believe this may also happen when the symbol name is too long and truncated. The original code is based on: https://msdn.microsoft.com/en-us/library/windows/desktop/ms680580(v=vs.85).aspx A right implementation can be found here: https://cs.chromium.org/chromium/src/base/debug/stack_trace_win.cc?l=145&rcl=f4ecb9e37e9e2d59e32b8b96f23ac4a1e33b9552 As described here: https://msdn.microsoft.com/en-us/library/windows/desktop/ms680686(v=vs.85).aspx NameLen The length of the name, in characters, not including the null-terminating character. MaxNameLen The size of the Name buffer, in characters. If this member is 0, the Name member is not used. This issue was causing the catapult symbolisation script to encode incorrect (random) characters into the symbol names. See the example in the bug. R=wfh@chromium.org, chrisha@chromium.org, erikchen@chromium.org, ajwong@chromium.org BUG=713741 Review-Url: https://codereview.chromium.org/2832643004 Cr-Commit-Position: refs/heads/master@{#466098}