[Webkit-unassigned] [Bug 172595] New: Clang warns about (intended) returning pointer to stack location in WTF/wtf/ThreadingPthreads.cpp

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 25 09:17:14 PDT 2017


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

            Bug ID: 172595
           Summary: Clang warns about (intended) returning pointer to
                    stack location in WTF/wtf/ThreadingPthreads.cpp
           Product: WebKit
           Version: Other
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Template Framework
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: aperez at igalia.com

When building with Clang (at least on GNU/Linux), the warning is:

  ../../Source/WTF/wtf/ThreadingPthreads.cpp:105:13: warning: address of stack memory associated with local variable 'stackLocation' returned [-Wreturn-stack-address]
      return &stackLocation;                                                                                                                             
              ^~~~~~~~~~~~~                                              
  1 warning generated.        

It is possible to use a #pragma to silence this warning (as done
for GCC). I'm making a patch to silence this warning, because in
here returning a pointer to the stack is precisely what's intended.

-- 
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/20170525/edee6b22/attachment.html>


More information about the webkit-unassigned mailing list