You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by GitBox <gi...@apache.org> on 2019/12/06 04:00:39 UTC
[GitHub] [groovy] danielsun1106 commented on issue #1117: Fix OOME while
`parseClass(scriptText)`
danielsun1106 commented on issue #1117: Fix OOME while `parseClass(scriptText)`
URL: https://github.com/apache/groovy/pull/1117#issuecomment-562423016
The goal is to generate unique ID for same script text. The following code will cause OOME even if the script text has not been changed:
```groovy
def gcl = new GroovyClassLoader()
while (true) {
gcl.parseClass('def x = 1')
}
```
Error message:
```
java.lang.OutOfMemoryError: Compressed class space
at ConsoleScript6.run(ConsoleScript6:4)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services