Skip to content

Commit b69f3fd

Browse files
rerobikaakosthekiss
authored andcommitted
Add missing error check after vm_op_get_value (#2655)
This patch fixes #2654. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
1 parent aae50c9 commit b69f3fd

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

jerry-core/vm/vm.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1725,12 +1725,15 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
17251725
{
17261726
left_value = ECMA_VALUE_UNDEFINED;
17271727
right_value = ECMA_VALUE_UNDEFINED;
1728+
}
17281729

1729-
if (ECMA_IS_VALUE_ERROR (result))
1730-
{
1731-
goto error;
1732-
}
1730+
if (ECMA_IS_VALUE_ERROR (result))
1731+
{
1732+
goto error;
1733+
}
17331734

1735+
if (opcode < CBC_PRE_INCR)
1736+
{
17341737
break;
17351738
}
17361739

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright JS Foundation and other contributors, http://js.foundation
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
--null.static ? this : [ , ] instanceof true;

0 commit comments

Comments
 (0)