There is an Assertion ''JERRY_CONTEXT (jmem_heap_allocated_size) == 0'' failed at /jerry-core/jmem/jmem-heap.c in Jerryscript 3.0.0.
###### JerryScript revision

Commit: [51da1551](https://github.com/jerryscript-project/jerryscript/commit/51da15516e1436184be9914314f76d596f14cd27)

Version: v3.0.0


###### Build platform

Ubuntu 18.04.5 LTS (Linux 5.4.0-44-generic x86_64)



###### Build steps

```bash
./tools/build.py --clean --debug --profile=es2015-subset --compile-flag=-fsanitize=address --compile-flag=-m32 --lto=off --logging=on --line-info=on --error-message=on --system-allocator=on --stack-limit=20
```



###### Test case

```javascript
function JSEtest(predicate, item) {
  if (!predicate) {
    log.push(item);
  }
}

var global = this;
Object.getOwnPropertyNames(global).forEach(function (name) {
  if (name[0] != name[0].toUpperCase()) {
    return;
  }

  var obj = global[name]; 

  if (!obj.toString().includes('native')) {
    return;
  } 

  try {
    new obj();
  } catch (e) {
    ;
  } 

  var constructor = obj.constructor; 

  var prototype = obj.prototype;

  var prototype_constructor = prototype.constructor;
  JSEtest(`${name}.prototype.constructor`);
}); 
```

​	

###### Execution steps & Output

```bash
$ ./jerryscript/build/bin/jerry poc.js

ICE: Assertion 'ecma_object_check_class_name_is_object (obj_p)' failed at /root/jerryscript/jerry-core/ecma/operations/ecma-objects.c(ecma_object_get_class_name):3009.
Error: ERR_FAILED_INTERNAL_ASSERTION
```

Credits: Found by OWL337 team.
Assertion 'ecma_object_check_class_name_is_object (obj_p)' failed at ecma-objects.c(ecma_object_get_class_name)
This is a GitHub Issue
repo:jerryscript
owner:jerryscript-project
Title : Assertion 'ecma_object_check_class_name_is_object (obj_p)' failed at ecma-objects.c(ecma_object_get_class_name)
Issue date:

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

Commit: [51da1551](https://github.com/jerryscript-project/jerryscript/commit/51da15516e1436184be9914314f76d596f14cd27)

Version: v3.0.0


###### Build platform

Ubuntu 18.04.5 LTS (Linux 5.4.0-44-generic x86_64)



###### Build steps

```bash
./tools/build.py --clean --debug --profile=es2015-subset --compile-flag=-fsanitize=address --compile-flag=-m32 --lto=off --logging=on --line-info=on --error-message=on --system-allocator=on --stack-limit=20
```



###### Test case

```javascript
function JSEtest(predicate, item) {
  if (!predicate) {
    log.push(item);
  }
}

var global = this;
Object.getOwnPropertyNames(global).forEach(function (name) {
  if (name[0] != name[0].toUpperCase()) {
    return;
  }

  var obj = global[name]; 

  if (!obj.toString().includes('native')) {
    return;
  } 

  try {
    new obj();
  } catch (e) {
    ;
  } 

  var constructor = obj.constructor; 

  var prototype = obj.prototype;

  var prototype_constructor = prototype.constructor;
  JSEtest(`${name}.prototype.constructor`);
}); 
```

​	

###### Execution steps & Output

```bash
$ ./jerryscript/build/bin/jerry poc.js

ICE: Assertion 'ecma_object_check_class_name_is_object (obj_p)' failed at /root/jerryscript/jerry-core/ecma/operations/ecma-objects.c(ecma_object_get_class_name):3009.
Error: ERR_FAILED_INTERNAL_ASSERTION
```

Credits: Found by OWL337 team.
--- end body ---

An assertion failure in JerryScript v3.0.0 indicates a potential vulnerability where an attacker can trigger an internal assertion failure by passing unexpected object types to the constructor. This could lead to Denial of Service (DoS) conditions if exploited, as the program crashes when the assertion fails.