Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hanged on Solc Version 0.6.0 #112

Open
4 tasks
saarshah opened this issue Dec 28, 2019 · 0 comments
Open
4 tasks

Hanged on Solc Version 0.6.0 #112

saarshah opened this issue Dec 28, 2019 · 0 comments

Comments

@saarshah
Copy link

I have checked the following

  • The souffle binary is available, output when running souffle:
    ============================================================================
    souffle -- A datalog engine.
    Usage: souffle [OPTION] FILE.

Options:
-F --fact-dir= Specify directory for fact files.
-I --include-dir= Specify directory for include files.
-D --output-dir= Specify directory for output files (if is -, stdout is used).
-j --jobs= Run interpreter/compiler in parallel using N threads, N=auto for system default.
-c --compile Generate C++ source code, compile to a binary executable, then run this executable.
-g --generate= Generate C++ source code for the given Datalog program and write it to .
-s --swig= Generate SWIG interface for given language. The values accepts is java and python.
-L --library-dir= Specify directory for library files.
-l --libraries= Specify libraries.
-w --no-warn Disable warnings.
-m --magic-transform= Enable magic set transformation changes on the given relations, use '*' for all.
-M --macro= Set macro definitions for the pre-processor
-z --disable-transformers= Disable the given AST transformers.
-o --dl-program= Generate C++ source code, written to , and compile this to a binary executable (without executing it).
--live-profile Enable live profiling.
-p --profile= Enable profiling, and write profile data to .
-u --profile-use= Use profile log-file for profile-guided optimization.
-r --debug-report= Write HTML debug report to .
-P --pragma= Set pragma options.
-t<[ none | explain | explore | subtreeHeights ]> --provenance=<[ none | explain | explore | subtreeHeights ]> Enable provenance instrumentation and interaction.
-e<[ file | mpi ]> --engine=<[ file | mpi ]> Specify communication engine for distributed execution.
--hostfile= Specify --hostfile option for call to mpiexec when using mpi as execution engine.
-v --verbose Verbose output.
--version Version.
--transformed-datalog Output dl after all transformations.
--parse-errors Show parsing errors, if any, then exit.
-h --help Display this help message.

Version: 1.7.1

Copyright (c) 2016-18 The Souffle Developers.
Copyright (c) 2013-16 Oracle and/or its affiliates.
All rights reserved.
$OUTPUT

  • Output of solc --version

$OUTPUT

  • Output of solc --bin-runtime MyContract.sol
    Warning: Source file does not specify required compiler version! Consider adding "pragma solidity ^0.6.0;"
    --> src/test/resources/solidity/TokenReserve.sol:7:1:
    |
    7 | interface ERC20CompatibleToken {
    | ^ (Relevant source part starts here and spans across multiple lines).

======= src/test/resources/solidity/TokenReserve.sol:ERC20CompatibleToken =======
Binary of the runtime part:

======= src/test/resources/solidity/TokenReserve.sol:SafeMath =======
Binary of the runtime part:
73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a2e8a88f13a24640b44951e4f1993f067b222944743e0a819bada88bb494fd8e64736f6c63430006000033

======= src/test/resources/solidity/TokenReserve.sol:TokenReserve =======
Binary of the runtime part:
608060405234801561001057600080fd5b50600436106100b45760003560e01c806382edaf941161007157806382edaf941461018f5780638f4ffcb1146101d9578063948fadf41461029c578063c25322ae146102ba578063c3ff3d45146102d8578063f968f49314610334576100b4565b80631d121320146100b95780631fe66620146100fd5780633fd8b02f1461010757806358c4f1cf146101255780636e27d889146101435780637db4163a14610171575b600080fd5b6100fb600480360360208110156100cf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061033e565b005b610105610592565b005b61010f6107b0565b6040518082815260200191505060405180910390f35b61012d6107b6565b6040518082815260200191505060405180910390f35b61016f6004803603602081101561015957600080fd5b81019080803590602001909291905050506107c8565b005b6101796107d5565b6040518082815260200191505060405180910390f35b610197610858565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61029a600480360360808110156101ef57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561025657600080fd5b82018360208201111561026857600080fd5b8035906020019184600183028401116401000000008311171561028a57600080fd5b909192939192939050505061087e565b005b6102a46109ef565b6040518082815260200191505060405180910390f35b6102c26109f5565b6040518082815260200191505060405180910390f35b61031a600480360360208110156102ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109fd565b604051808215151515815260200191505060405180910390f35b61033c610a1d565b005b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166103e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806113016030913960400191505060405180910390fd5b600360008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156104a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4163636f756e7420697320616c726561647920617574686f72697a656400000081525060200191505060405180910390fd5b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fe7dbd42bc9c6dd6da9b76e2276a06078d0091e20b34ba05ae03e0977450c3a798133604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610634576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806113016030913960400191505060405180910390fd5b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166106f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f4163636f756e7420776173206e6f7420617574686f72697a656400000000000081525060200191505060405180910390fd5b6000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fc2e0a577963cbf13d6b3b04206effff57f0b291f749f2b6623784d061a070f8833604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b60005481565b60006107c3600554610aca565b905090565b6107d23382610ade565b50565b6000806000905060006107e742610d48565b9050600060055490505b6000811180156108015750818111155b1561084f5761082f600460008381526020019081526020016000206001015484610d6390919063ffffffff16565b9250600460008281526020019081526020016000206000015490506107f1565b82935050505090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610924576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806113316027913960400191505060405180910390fd5b60008414156109dd57600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166109cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180611358602b913960400191505060405180910390fd5b6109d885610de9565b6109e8565b6109e78585610ade565b5b5050505050565b60015481565b635c2aad8081565b60036020528060005260406000206000915054906101000a900460ff1681565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610abf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806113016030913960400191505060405180910390fd5b610ac833610de9565b565b60006001548202635c2aad80019050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd8330846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015610bbb57600080fd5b505af1158015610bcf573d6000803e3d6000fd5b505050506040513d6020811015610be557600080fd5b8101908080519060200190929190505050506000610c16610c1160005442610d6390919063ffffffff16565b610d48565b9050600654811415610c6e57610c4d8260046000600654815260200190815260200160002060010154610d6390919063ffffffff16565b60046000600654815260200190815260200160002060010181905550610ce9565b60006006541415610c855780600581905550610ca3565b80600460006006548152602001908152602001600020600001819055505b6040518060400160405280600081526020018381525060046000836006819055815260200190815260200160002060008201518160000155602082015181600101559050505b610cfe82600754610d6390919063ffffffff16565b6007819055507f9e88fd848e1f22578aadbdd71e0885905b3ff944ca7db29aef69ba0f21a3bdc28242604051808381526020018281526020019250505060405180910390a1505050565b6000600154635c2aad80830381610d5b57fe5b049050919050565b6000818301905082811015610de0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f53756d206f766572666c6f77000000000000000000000000000000000000000081525060200191505060405180910390fd5b80905092915050565b60008090506000610df942610d48565b90506000809050600060075490505b6000600554118015610e1c57508260055411155b8015610e3d5750617530620493e0450381610e3357fe5b0482806001019350105b15610ec157610e6d6004600060055481526020019081526020016000206001015485610d6390919063ffffffff16565b93506000600460006005548152602001908152602001600020600001549050600460006005548152602001908152602001600020600080820160009055600182016000905550508060058190555050610e08565b60006005541415610ed55760006006819055505b60008414610f3857610ef28460075461127d90919063ffffffff16565b6007819055507f2e444eb379b177e88ce0649c6110a3b01099f03e297127919dd5e3b63a761a9c8442604051808381526020018281526020019250505060405180910390a15b80600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610fd857600080fd5b505afa158015610fec573d6000803e3d6000fd5b505050506040513d602081101561100257600080fd5b8101908080519060200190929190505050111561111a5761111761110882600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156110bf57600080fd5b505afa1580156110d3573d6000803e3d6000fd5b505050506040513d60208110156110e957600080fd5b810190808051906020019092919050505061127d90919063ffffffff16565b85610d6390919063ffffffff16565b93505b6000841415611191576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4e6f7468696e6720746f20756e6c6f636b00000000000000000000000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb86866040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561123a57600080fd5b505af115801561124e573d6000803e3d6000fd5b505050506040513d602081101561126457600080fd5b8101908080519060200190929190505050505050505050565b6000828211156112f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f5375627472616374696f6e20756e646572666c6f77000000000000000000000081525060200191505060405180910390fd5b81830390509291505056fe4f6e6c7920617574686f72697a6564206164647265737365732063616e2063616c6c20746869732066756e6374696f6e53656e646572206d757374206265206120746f6b656e20636f6e747261637420616464726573734f6e6c7920617574686f72697a6564206164647265737365732063616e20756e6c6f636b20746f6b656e73a2646970667358221220cb044b42d38bdec1e3434ab5f44bf3a35d19d86e0e23e47cd1118f5b3569b74f64736f6c63430006000033
$OUTPUT

  • I can reproduce this issue in a Docker container with the following command
    n/a
    $COMMAND

Steps to reproduce

  1. download this contract from Etherscan
  2. comment line pragma , so that it can run on v.0.6. solc.. put it on test/resources/solidity/
  3. java -jar build/libs/securify.jar -fs src/test/resources/solidity/TokenReserve.sol
    $STEPS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant