###### JerryScript revision
df6d430

###### Build platform
Ubuntu 18.04.5 LTS(Linux 4.15.0-119-generic x86_64)
###### Build steps
```
./tools/build.py --clean --debug --compile-flag=-fsanitize=address \
--compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \
--compile-flag=-fno-common --compile-flag=-g --strip=off \
--system-allocator=on --logging=on --linker-flag=-fuse-ld=gold \
--error-messages=on --profile=es2015-subset  --builddir=$PWD/build
```

###### Test case
```
var arr = new Array(10);
Date.parse((arr, "length", exception = new Proxy(((arr, "length", exception = new Proxy(Function(), (arr, "length", exception = new Proxy(Function(), { get:function(){ return function(){ return (Number.MAX_VALUE); }; }}))))), (arr, "length", exception = new Proxy(Function(), { get:function(){ return function(){ return (Number.MAX_VALUE); }; }})))));

```
###### Output
```
ICE: Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed at /root/jerryscript/jerry-core/jmem/jmem-heap.c(jmem_heap_finalize):107.
Error: ERR_FAILED_INTERNAL_ASSERTION
Aborted

```
Credits: Found by chong from OWL337.
Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed in jmem_heap_finalize
This is a GitHub Issue
repo:jerryscript
owner:jerryscript-project
Title : Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed in jmem_heap_finalize
Issue date:

--- start body ---
###### JerryScript revision
df6d430

###### Build platform
Ubuntu 18.04.5 LTS(Linux 4.15.0-119-generic x86_64)
###### Build steps
```
./tools/build.py --clean --debug --compile-flag=-fsanitize=address \
--compile-flag=-m32 --compile-flag=-fno-omit-frame-pointer \
--compile-flag=-fno-common --compile-flag=-g --strip=off \
--system-allocator=on --logging=on --linker-flag=-fuse-ld=gold \
--error-messages=on --profile=es2015-subset  --builddir=$PWD/build
```

###### Test case
```
var arr = new Array(10);
Date.parse((arr, "length", exception = new Proxy(((arr, "length", exception = new Proxy(Function(), (arr, "length", exception = new Proxy(Function(), { get:function(){ return function(){ return (Number.MAX_VALUE); }; }}))))), (arr, "length", exception = new Proxy(Function(), { get:function(){ return function(){ return (Number.MAX_VALUE); }; }})))));

```
###### Output
```
ICE: Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed at /root/jerryscript/jerry-core/jmem/jmem-heap.c(jmem_heap_finalize):107.
Error: ERR_FAILED_INTERNAL_ASSERTION
Aborted

```
Credits: Found by chong from OWL337.
--- end body ---

An assertion failure in JerryScript's memory management indicates a potential vulnerability related to improper handling of memory allocation. The assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' suggests that the memory heap is not in a clean state when finalization occurs, which could lead to undefined behavior or exploitation opportunities.