###### JerryScript revision

Commit: [a6ab5e9](https://github.com/jerryscript-project/jerryscript/commit/a6ab5e9abed70cdedf9f4e9c1dc379eb762ebf64)

Version: v3.0.0



###### Build platform

Ubuntu 18.04.5 LTS (Linux 4.19.128-microsoft-standard x86_64)

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



###### Build steps

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



###### Test case
<details>
<summary>poc.js</summary>
<pre><code>

```javascript
function JSEtest() {
  var obj = __defineGetter__;

  function myGetter() {
    obj.foo = (obj.__lookupGetter__('foo') === myGetter)
  }
  function mySetter(v) {
    try {
      JSEtest();
    } catch (e) {
      print(e.stack || e);
    }
  }

  obj.__defineGetter__('foo', myGetter);
  obj.__defineSetter__('foo', mySetter);
  obj.foo = 123;
  print(obj.foo);
}

try {
  JSEtest();
} catch (e) {
}
```
</code></pre>
</details>
​	

###### Execution steps & Output

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

poc.js:11:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:22:5
......                               ......                                   ......
......                               ......                                   ......
undefined
poc.js:11:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:9:13,poc.js:5:9,poc.js:17:5,poc.js:9:13,poc.js:5:9,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:22:5
ICE: Assertion 'ecma_is_lexical_environment (object_p)' failed at jerryscript/jerry-core/ecma/base/ecma-helpers.c(ecma_get_lex_env_type):291.
Error: ERR_FAILED_INTERNAL_ASSERTION
[1]    11223 abort      jerry poc.js
```


Assertion 'ecma_is_lexical_environment (object_p)' failed at jerryscript/jerry-core/ecma/base/ecma-helpers.c(ecma_get_lex_env_type):291.
This is a GitHub Issue
repo:jerryscript
owner:jerryscript-project
Title : Assertion 'ecma_is_lexical_environment (object_p)' failed at jerryscript/jerry-core/ecma/base/ecma-helpers.c(ecma_get_lex_env_type):291.
Issue date:

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

Commit: [a6ab5e9](https://github.com/jerryscript-project/jerryscript/commit/a6ab5e9abed70cdedf9f4e9c1dc379eb762ebf64)

Version: v3.0.0



###### Build platform

Ubuntu 18.04.5 LTS (Linux 4.19.128-microsoft-standard x86_64)

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



###### Build steps

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



###### Test case
<details>
<summary>poc.js</summary>
<pre><code>

```javascript
function JSEtest() {
  var obj = __defineGetter__;

  function myGetter() {
    obj.foo = (obj.__lookupGetter__('foo') === myGetter)
  }
  function mySetter(v) {
    try {
      JSEtest();
    } catch (e) {
      print(e.stack || e);
    }
  }

  obj.__defineGetter__('foo', myGetter);
  obj.__defineSetter__('foo', mySetter);
  obj.foo = 123;
  print(obj.foo);
}

try {
  JSEtest();
} catch (e) {
}
```
</code></pre>
</details>
​	

###### Execution steps & Output

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

poc.js:11:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:22:5
......                               ......                                   ......
......                               ......                                   ......
undefined
poc.js:11:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:9:13,poc.js:5:9,poc.js:17:5,poc.js:9:13,poc.js:5:9,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:9:13,poc.js:17:5,poc.js:22:5
ICE: Assertion 'ecma_is_lexical_environment (object_p)' failed at jerryscript/jerry-core/ecma/base/ecma-helpers.c(ecma_get_lex_env_type):291.
Error: ERR_FAILED_INTERNAL_ASSERTION
[1]    11223 abort      jerry poc.js
```


--- end body ---
