[llvm-bugs] [Bug 28416] malloc is optimized out for release build

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jul 4 10:30:14 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28416

David Majnemer <david.majnemer at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |david.majnemer at gmail.com
         Resolution|---                         |INVALID

--- Comment #1 from David Majnemer <david.majnemer at gmail.com> ---
LLVM has not optimized your program into an inconsistent state because calling
malloc is not an observable side effect in and of itself.  If the compiler can
satisfy your use of malloc in a way which doesn't end up calling malloc, that's
ok.

If you did something else with the malloc'd pointer like called
malloc_usable_size (or escaped it through any other mechanism) then that would
be a different story.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160704/0e1312b7/attachment-0001.html>


More information about the llvm-bugs mailing list