[webkit-reviews] review denied: [Bug 172768] [JSC] WTFGetBacktrace can return numberOfFrames == 0 in some architectures : [Attachment 314261] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jun 30 06:41:53 PDT 2017
Mark Lam <mark.lam at apple.com> has denied Caio Lima <ticaiolima at gmail.com>'s
request for review:
Bug 172768: [JSC] WTFGetBacktrace can return numberOfFrames == 0 in some
architectures
https://bugs.webkit.org/show_bug.cgi?id=172768
Attachment 314261: Patch
https://bugs.webkit.org/attachment.cgi?id=314261&action=review
--- Comment #19 from Mark Lam <mark.lam at apple.com> ---
Comment on attachment 314261
--> https://bugs.webkit.org/attachment.cgi?id=314261
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=314261&action=review
> Source/WTF/wtf/StackTrace.cpp:64
> + trace->m_capacity = maxFrames;
This is still incorrect. capacity and size are 2 different concepts.
trace->m_capacity needs to be set even if trace->m_size is 0. If you look in
StackTrace.hpp, you'll see that trace->m_capacity being set has a special
meaning: it means that we did allocate memory for the StackTrace trace (which
we did because we ensure that maxFrames = std::max(1, maxFrames) above). In
practice, though not setting trace->m_capacity here means that stack() will
return a random address, size() being 0 should stop the client from using the
buffer. Regardless, let's do this properly and set trace->m_capacity so that
we tell the truth about how we allocate the buffer.
More information about the webkit-reviews
mailing list