Created
          September 30, 2012 16:36 
        
      - 
      
 - 
        
Save c2nes/3807494 to your computer and use it in GitHub Desktop.  
    Generates a Test.java file that causes a stack overflow exception when compiled with javac
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ( | |
| echo 'public class Test {' | |
| echo ' public void test() {' | |
| echo -n ' int n = ' | |
| for i in {0..10000}; do | |
| echo -n '('; | |
| done; | |
| echo -n 1; | |
| for i in {0..10000}; do | |
| echo -n ' + 1)'; | |
| done | |
| echo ';' | |
| echo ' }' | |
| echo '}' | |
| ) > Test.java | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment