Zilliqa / scilla-compiler

Compile Scilla to LLVM-IR
GNU General Public License v3.0
8 stars 4 forks source link

Contract parameter names and Transition names are in the same global namespace #67

Closed vaivaswatha closed 3 years ago

vaivaswatha commented 3 years ago

Scilla allows contract parameter names and transition names to be the same. But the compiler generates a LLVM global name for both of these which is accessed directly from the VM (via getAddressOf). LLVM renames one of them silently, leading to illegal access from the VM.

A possible solution for this is to prefix all contract parameter names with _cparam_ and update to that convention in the VM.