aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-08-02 21:46:02 +0800
committerGitHub <noreply@github.com>2017-08-02 21:46:02 +0800
commitbd9e91085b239323e3280c720135059c5e55cacb (patch)
tree0de977822159a3b495f5c7b936dcd2e145a75c3e /docs
parent04166ce1085daf8a0fb975b701e7b5980696d5bc (diff)
parentd1b13c0624f93913c08fc2fdd152abef3002d2d2 (diff)
downloaddexon-solidity-bd9e91085b239323e3280c720135059c5e55cacb.tar.gz
dexon-solidity-bd9e91085b239323e3280c720135059c5e55cacb.tar.zst
dexon-solidity-bd9e91085b239323e3280c720135059c5e55cacb.zip
Merge pull request #2679 from ethereum/delegatecall
.delegatecall() should always return a boolean of execution status
Diffstat (limited to 'docs')
-rw-r--r--docs/bugs.json12
-rw-r--r--docs/bugs_by_version.json25
-rw-r--r--docs/control-structures.rst3
3 files changed, 37 insertions, 3 deletions
diff --git a/docs/bugs.json b/docs/bugs.json
index 4fd73492..ac322a48 100644
--- a/docs/bugs.json
+++ b/docs/bugs.json
@@ -1,14 +1,22 @@
[
{
+ "name": "DelegateCallReturnValue",
+ "summary": "The low-level .delegatecall() does not return the execution outcome, but converts the value returned by the functioned called to a boolean instead.",
+ "description": "The return value of the low-level .delegatecall() function is taken from a position in memory, where the call data or the return data resides. This value is interpreted as a boolean and put onto the stack. This means if the called function returns at least 32 zero bytes, .delegatecall() returns false even if the call was successuful.",
+ "introduced": "0.3.0",
+ "fixed": "0.4.15",
+ "severity": "low"
+ },
+ {
"name": "ECRecoverMalformedInput",
- "summary": "The ecrecover() builtin can return garbage for malformed input.",
+ "summary": "The ecrecover() builtin can return garbage for malformed input.",
"description": "The ecrecover precompile does not properly signal failure for malformed input (especially in the 'v' argument) and thus the Solidity function can return data that was previously present in the return area in memory.",
"fixed": "0.4.14",
"severity": "medium"
},
{
"name": "SkipEmptyStringLiteral",
- "summary": "If \"\" is used in a function call, the following function arguments will not be correctly passed to the function.",
+ "summary": "If \"\" is used in a function call, the following function arguments will not be correctly passed to the function.",
"description": "If the empty string literal \"\" is used as an argument in a function call, it is skipped by the encoder. This has the effect that the encoding of all arguments following this is shifted left by 32 bytes and thus the function call data is corrupted.",
"fixed": "0.4.12",
"severity": "low"
diff --git a/docs/bugs_by_version.json b/docs/bugs_by_version.json
index 1a5b4f5f..f3e42f91 100644
--- a/docs/bugs_by_version.json
+++ b/docs/bugs_by_version.json
@@ -182,6 +182,7 @@
},
"0.3.0": {
"bugs": [
+ "DelegateCallReturnValue",
"ECRecoverMalformedInput",
"SkipEmptyStringLiteral",
"ConstantOptimizerSubtraction",
@@ -198,6 +199,7 @@
},
"0.3.1": {
"bugs": [
+ "DelegateCallReturnValue",
"ECRecoverMalformedInput",
"SkipEmptyStringLiteral",
"ConstantOptimizerSubtraction",
@@ -213,6 +215,7 @@
},
"0.3.2": {
"bugs": [
+ "DelegateCallReturnValue",
"ECRecoverMalformedInput",
"SkipEmptyStringLiteral",
"ConstantOptimizerSubtraction",
@@ -228,6 +231,7 @@
},
"0.3.3": {
"bugs": [
+ "DelegateCallReturnValue",
"ECRecoverMalformedInput",
"SkipEmptyStringLiteral",
"ConstantOptimizerSubtraction",
@@ -242,6 +246,7 @@
},
"0.3.4": {
"bugs": [
+ "DelegateCallReturnValue",
"ECRecoverMalformedInput",
"SkipEmptyStringLiteral",
"ConstantOptimizerSubtraction",
@@ -256,6 +261,7 @@
},
"0.3.5": {
"bugs": [
+ "DelegateCallReturnValue",
"ECRecoverMalformedInput",
"SkipEmptyStringLiteral",
"ConstantOptimizerSubtraction",
@@ -270,6 +276,7 @@
},
"0.3.6": {
"bugs": [
+ "DelegateCallReturnValue",
"ECRecoverMalformedInput",
"SkipEmptyStringLiteral",
"ConstantOptimizerSubtraction",
@@ -282,6 +289,7 @@
},
"0.4.0": {
"bugs": [
+ "DelegateCallReturnValue",
"ECRecoverMalformedInput",
"SkipEmptyStringLiteral",
"ConstantOptimizerSubtraction",
@@ -294,6 +302,7 @@
},
"0.4.1": {
"bugs": [
+ "DelegateCallReturnValue",
"ECRecoverMalformedInput",
"SkipEmptyStringLiteral",
"ConstantOptimizerSubtraction",
@@ -306,6 +315,7 @@
},
"0.4.10": {
"bugs": [
+ "DelegateCallReturnValue",
"ECRecoverMalformedInput",
"SkipEmptyStringLiteral",
"ConstantOptimizerSubtraction"
@@ -314,6 +324,7 @@
},
"0.4.11": {
"bugs": [
+ "DelegateCallReturnValue",
"ECRecoverMalformedInput",
"SkipEmptyStringLiteral"
],
@@ -321,22 +332,27 @@
},
"0.4.12": {
"bugs": [
+ "DelegateCallReturnValue",
"ECRecoverMalformedInput"
],
"released": "2017-07-03"
},
"0.4.13": {
"bugs": [
+ "DelegateCallReturnValue",
"ECRecoverMalformedInput"
],
"released": "2017-07-06"
},
"0.4.14": {
- "bugs": [],
+ "bugs": [
+ "DelegateCallReturnValue"
+ ],
"released": "2017-07-31"
},
"0.4.2": {
"bugs": [
+ "DelegateCallReturnValue",
"ECRecoverMalformedInput",
"SkipEmptyStringLiteral",
"ConstantOptimizerSubtraction",
@@ -348,6 +364,7 @@
},
"0.4.3": {
"bugs": [
+ "DelegateCallReturnValue",
"ECRecoverMalformedInput",
"SkipEmptyStringLiteral",
"ConstantOptimizerSubtraction",
@@ -358,6 +375,7 @@
},
"0.4.4": {
"bugs": [
+ "DelegateCallReturnValue",
"ECRecoverMalformedInput",
"SkipEmptyStringLiteral",
"ConstantOptimizerSubtraction",
@@ -367,6 +385,7 @@
},
"0.4.5": {
"bugs": [
+ "DelegateCallReturnValue",
"ECRecoverMalformedInput",
"SkipEmptyStringLiteral",
"ConstantOptimizerSubtraction",
@@ -377,6 +396,7 @@
},
"0.4.6": {
"bugs": [
+ "DelegateCallReturnValue",
"ECRecoverMalformedInput",
"SkipEmptyStringLiteral",
"ConstantOptimizerSubtraction",
@@ -386,6 +406,7 @@
},
"0.4.7": {
"bugs": [
+ "DelegateCallReturnValue",
"ECRecoverMalformedInput",
"SkipEmptyStringLiteral",
"ConstantOptimizerSubtraction"
@@ -394,6 +415,7 @@
},
"0.4.8": {
"bugs": [
+ "DelegateCallReturnValue",
"ECRecoverMalformedInput",
"SkipEmptyStringLiteral",
"ConstantOptimizerSubtraction"
@@ -402,6 +424,7 @@
},
"0.4.9": {
"bugs": [
+ "DelegateCallReturnValue",
"ECRecoverMalformedInput",
"SkipEmptyStringLiteral",
"ConstantOptimizerSubtraction"
diff --git a/docs/control-structures.rst b/docs/control-structures.rst
index a7af69f5..796e9238 100644
--- a/docs/control-structures.rst
+++ b/docs/control-structures.rst
@@ -393,6 +393,9 @@ When exceptions happen in a sub-call, they "bubble up" (i.e. exceptions are reth
and the low-level functions ``call``, ``delegatecall`` and ``callcode`` -- those return ``false`` in case
of an exception instead of "bubbling up".
+.. warning::
+ The low-level ``call``, ``delegatecall`` and ``callcode`` will return success if the calling account is non-existent, as part of the design of EVM. Existence must be checked prior to calling if desired.
+
Catching exceptions is not yet possible.
In the following example, you can see how ``require`` can be used to easily check conditions on inputs