title: The forked VM terminated without properly saying goodbye when -Xmx set to over 1g
body: <p>I'm taking a course where the homework is executed using Maven, and the .pom file is provided with the project. The assignment requires about 1.5gb of memory to process. However when providing more than 1gb I receive the following output:</p>
  
  <pre><code>[WARNING] Corrupted STDOUT by directly writing to native stream in forked JVM 1
  ExecutionException The forked VM terminated without properly saying goodbye. VM 
  crash or System.exit called?
  Error occurred in starting fork, check output in log
  </code></pre>
  
  <p>The dump reads:</p>
  
  <pre><code>Corrupted STDOUT by directly writing to native stream in forked JVM 1. Stream 
  'Error occurred during initialization of VM'.
  java.lang.IllegalArgumentException: Stream stdin corrupted. Expected comma 
  after third character in command 'Error occurred during initialization of VM'.
  at org.apache.maven.plugin.surefire.booterclient.output.ForkClient$OperationalData.&lt;init&gt;(ForkClient.java:511)
  at org.apache.maven.plugin.surefire.booterclient.output.ForkClient.processLine(ForkClient.java:209)
  at org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:176)
  at org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:88)
  at java.lang.Thread.run(Thread.java:748)
  </code></pre>
  
  <p>The block in question is:</p>
  
  <pre><code>&lt;plugin&gt;
                  &lt;!-- executes test with -Xmx option --&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.22.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;forkCount&gt;4&lt;/forkCount&gt;
                      &lt;reuseForks&gt;true&lt;/reuseForks&gt;
                      &lt;argLine&gt;-Xmx2048m&lt;/argLine&gt;
                      &lt;useSystemClassLoader&gt;true&lt;/useSystemClassLoader&gt;
                      &lt;testFailureIgnore&gt;true&lt;/testFailureIgnore&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  </code></pre>
  
  <p>Where is -Xmx is set to more than 1g/1024m I run into the described issue.</p>