# Version
Version: 3.0.0 ( 1a2c047 )

# Execution steps
/root/.jsvu/jerry Testcase.js
# Testcase
```
var foo = function() {
    var s = "[0";
    for (var i = 0; i < (128 << 10); i++) {
        s += "[0-9]";
    }
    s += "]";
    return eval(s);
}
var foo1 = foo();
print(foo1); 
```
# Output
```
ICE: Assertion 'jmem_is_heap_pointer ((void *) uint_ptr)' failed at /root/js_engines/jerryscript/jerry-core/jmem/jmem-allocator.c(jmem_decompress_pointer):229.
Error: ERR_FAILED_INTERNAL_ASSERTION
```
# Expected behavior
Error: Out of stack space

# Description
There seems to be a lack of memory overflow detection, perhaps similar to circular calls  
[#5039](https://github.com/jerryscript-project/jerryscript/issues/5039), but ideally dead loops should be detected initially and memory overflow should be caught

Hope jerryscript gets better and better  
Looking forward to your reply :)
Memory question under loop
This is a GitHub Issue
repo:jerryscript
owner:jerryscript-project
Title : Memory question under loop
Issue date:

--- start body ---
# Version
Version: 3.0.0 ( 1a2c047 )

# Execution steps
/root/.jsvu/jerry Testcase.js
# Testcase
```
var foo = function() {
    var s = "[0";
    for (var i = 0; i < (128 << 10); i++) {
        s += "[0-9]";
    }
    s += "]";
    return eval(s);
}
var foo1 = foo();
print(foo1); 
```
# Output
```
ICE: Assertion 'jmem_is_heap_pointer ((void *) uint_ptr)' failed at /root/js_engines/jerryscript/jerry-core/jmem/jmem-allocator.c(jmem_decompress_pointer):229.
Error: ERR_FAILED_INTERNAL_ASSERTION
```
# Expected behavior
Error: Out of stack space

# Description
There seems to be a lack of memory overflow detection, perhaps similar to circular calls  
[#5039](https://github.com/jerryscript-project/jerryscript/issues/5039), but ideally dead loops should be detected initially and memory overflow should be caught

Hope jerryscript gets better and better  
Looking forward to your reply :)
--- end body ---
