
###### JerryScript revision

0d4969661810b9e618485c284c361e597144e9b9

###### Build platform

Ubuntu 20.04.4 LTS

###### Build steps

```sh
python tools/build.py --debug --logging=on --error-messages=on --line-info=on 
```

###### Test case

```js
var f = function () {}

let x = {
    get: function (theTarget, propName) {
        return 0;
    }
};

let p = new Proxy(Number, x);

try {
    let n = new p(f);
} catch (e) {
    print(e);
}

print('exit ...');
```

###### Execution steps

```sh
build/bin/jerry poc.js
```

###### Output

```
TypeError: Incorrect value is returned by a Proxy 'get' trap
exit ...
ICE: Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed at jerryscript/jerry-core/jmem/jmem-heap.c(jmem_heap_finalize):108.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted
```

Memory Leak in Number Proxy 
This is a GitHub Issue
repo:jerryscript
owner:jerryscript-project
Title : Memory Leak in Number Proxy 
Issue date:

--- start body ---

###### JerryScript revision

0d4969661810b9e618485c284c361e597144e9b9

###### Build platform

Ubuntu 20.04.4 LTS

###### Build steps

```sh
python tools/build.py --debug --logging=on --error-messages=on --line-info=on 
```

###### Test case

```js
var f = function () {}

let x = {
    get: function (theTarget, propName) {
        return 0;
    }
};

let p = new Proxy(Number, x);

try {
    let n = new p(f);
} catch (e) {
    print(e);
}

print('exit ...');
```

###### Execution steps

```sh
build/bin/jerry poc.js
```

###### Output

```
TypeError: Incorrect value is returned by a Proxy 'get' trap
exit ...
ICE: Assertion 'JERRY_CONTEXT (jmem_heap_allocated_size) == 0' failed at jerryscript/jerry-core/jmem/jmem-heap.c(jmem_heap_finalize):108.
Error: JERRY_FATAL_FAILED_ASSERTION
Aborted
```

--- end body ---

A memory leak occurs in JerryScript when using a Proxy with the Number object, leading to an assertion failure during memory finalization. This can potentially be exploited to cause unexpected behavior or crashes in applications using JerryScript.