[PATCH] D65408: [Attributor] Heap-To-Stack Conversion

Stefan Stipanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 15 23:10:24 PDT 2019


sstefan1 marked an inline comment as done.
sstefan1 added a comment.

In D65408#1670708 <https://reviews.llvm.org/D65408#1670708>, @xbolva00 wrote:

> I think the current implementation needs some important fixes to avoid miscompilation/overflow, can you make it off by default, fix issues, and enable it again?
>
> Thanks.


Attributor is turned if by dedault right now, so h2s is also turned off. I will revisit this again this week and try to address most of the concerns you raised in a new patch.



================
Comment at: llvm/trunk/lib/Transforms/IPO/Attributor.cpp:3229
+        auto *SizeT = dyn_cast<ConstantInt>(MallocCall->getOperand(1));
+        APInt TotalSize = SizeT->getValue() * Num->getValue();
+        Size =
----------------
xbolva00 wrote:
> Check for overflow is missing
If there is an overflow, this will not be executed.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65408/new/

https://reviews.llvm.org/D65408





More information about the llvm-commits mailing list