ArnoldC
ArnoldC copied to clipboard
Inconsistent stack map frames
I tried to write a recursive factorial function, the compiler did not complain, but when i tried to run it, jvm threw an exception when loading the class file
Exception in thread "main" java.lang.VerifyError: Inconsistent stackmap frames at branch target 39 in method fact.fact(I)I at offset 16 at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2521) at java.lang.Class.getMethod0(Class.java:2764) at java.lang.Class.getMethod(Class.java:1653) at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
and here's the source of the factorial method & main: IT'S SHOWTIME HEY CHRISTMAS TREE f YOU SET US UP 1 GET YOUR ASS TO MARS f DO IT NOW fact 5 TALK TO THE HAND f YOU HAVE BEEN TERMINATED
LISTEN TO ME VERY CAREFULLY fact
I NEED YOUR CLOTHES YOUR BOOTS AND YOUR MOTORCYCLE n
GIVE THESE PEOPLE AIR
HEY CHRISTMAS TREE m
YOU SET US UP 1
HEY CHRISTMAS TREE f
YOU SET US UP 1
BECAUSE I'M GOING TO SAY PLEASE n
I'LL BE BACK 1
BULLSHIT
GET TO THE CHOPPER m
HERE IS MY INVITATION n
GET DOWN 1
ENOUGH TALK
GET YOUR ASS TO MARS f
DO IT NOW fact m
GET TO THE CHOPPER f
HERE IS MY INVITATION f
YOU'RE FIRED n
ENOUGH TALK
I'LL BE BACK f
YOU HAVE NO RESPECT FOR LOGIC
HASTA LA VISTA, BABY