File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed
Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,11 @@ realloc_regexp_bytecode_block (re_bytecode_ctx_t *bc_ctx_p) /**< RegExp bytecode
4848{
4949 JERRY_ASSERT (bc_ctx_p->block_end_p - bc_ctx_p->block_start_p >= 0 );
5050 size_t old_size = static_cast <size_t > (bc_ctx_p->block_end_p - bc_ctx_p->block_start_p );
51- JERRY_ASSERT (!bc_ctx_p->current_p && !bc_ctx_p->block_end_p && !bc_ctx_p->block_start_p );
51+
52+ /* If one of the members of RegExp bytecode context is NULL, then all member should be NULL
53+ * (it means first allocation), otherwise all of the members should be a non NULL pointer. */
54+ JERRY_ASSERT ((!bc_ctx_p->current_p && !bc_ctx_p->block_end_p && !bc_ctx_p->block_start_p )
55+ || (bc_ctx_p->current_p && bc_ctx_p->block_end_p && bc_ctx_p->block_start_p ));
5256
5357 size_t new_block_size = old_size + REGEXP_BYTECODE_BLOCK_SIZE;
5458 JERRY_ASSERT (bc_ctx_p->current_p - bc_ctx_p->block_start_p >= 0 );
Original file line number Diff line number Diff line change 1+ // Copyright 2015 Samsung Electronics Co., Ltd.
2+ // Copyright 2015 University of Szeged.
3+ //
4+ // Licensed under the Apache License, Version 2.0 (the "License");
5+ // you may not use this file except in compliance with the License.
6+ // You may obtain a copy of the License at
7+ //
8+ // http://www.apache.org/licenses/LICENSE-2.0
9+ //
10+ // Unless required by applicable law or agreed to in writing, software
11+ // distributed under the License is distributed on an "AS IS" BASIS
12+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ // See the License for the specific language governing permissions and
14+ // limitations under the License.
15+
16+ try
17+ {
18+ v_0 = / N (? ! [ ^ 6 ] (?: .) | (? ! C [ ^ k - o ] * | p ) { 0 , } | H ) | \\ x D F \\ d b { 0 , } | i \\ 0 ? ) / ;
19+ assert ( false ) ;
20+ }
21+ catch ( e )
22+ {
23+ assert ( e instanceof SyntaxError ) ;
24+ assert ( e . message === "Unexpected end of paren." ) ;
25+ }
You can’t perform that action at this time.
0 commit comments