[LLVMbugs] [Bug 13722] Address of stack memory associated with temporary object of type 'std::string' returned to caller

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Aug 28 18:15:19 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=13722

Jordan Rose <jordan_rose at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from Jordan Rose <jordan_rose at apple.com> 2012-08-28 20:15:19 CDT ---
Basically, a recent change of mine started treating all CXXConstructExprs not
tied to a variable or field as living on the stack. But of course, values
returned from functions don't live on /this/ stack frame...they live on the
/previous/ stack frame. If the object has a non-trivial destructor, though, the
return expression gets wrapped in an ExprWithCleanups node, and I was failing
to account for that.

Should be fixed in r162817. Thanks for catching all these newer bugs, Roland.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list