|
Какой то неведомый баг JVM
#33423770
Ссылка:
Ссылка на сообщение:
Ссылка с названием темы:
Ссылка на профиль пользователя:
|
Участник
Откуда: Elven Forest
Сообщения: 1 221
|
|
Добрый день!
Столкнулся с проблемой, с которой не сталкивался никогда. И не могу понять в чем дело. Это обнаружилось тогда когда проект перестал компилироваться - IDEA просто напросто зависала. Методом проб и ошибок удалось выяснить что дело в следующем: для этого написал специальный Test:
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14.
public class Test {
public static void foo() {
float m= 0 ; // !ОШИБКА!
//float m=1; //все нормально
for ( int i= 0 ; i< 100 ; i++) {
m += i;
}
}
public static void main(String[] args) {
}
}
так вот, в методе foo() есть место где определяется переменная float m с которой производятся действия в теле цикла. Если начальное значение принять за 1 (отличное от 0 значение - то все нормально), если же начальное значение == 0, то IDEA виснит. Пробовал компилировать из командной строки, вот что выдал компилятор:
jdk1.5.0_05
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72. 73. 74. 75. 76. 77. 78. 79. 80. 81. 82. 83. 84. 85. 86. 87. 88. 89. 90. 91. 92. 93. 94. 95. 96. 97. 98. 99. 100. 101. 102. 103. 104. 105. 106. 107. 108. 109. 110. 111. 112. 113. 114. 115. 116. 117. 118. 119. 120. 121. 122. 123. 124. 125. 126. 127. 128. 129. 130. 131. 132. 133. 134. 135. 136. 137. 138. 139. 140. 141. 142.
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_FLT_DIVIDE_BY_ZERO (0xc000008e) at pc=0x00f3a9f9, pid= 1204 , tid= 1116
#
# Java VM: Java HotSpot(TM) Client VM ( 1 . 5 .0_05-b05 mixed mode, sharing)
# Problematic frame:
# j com.sun.tools.javac.jvm.Items$ImmediateItem.isPosZero(F)Z+ 0
#
--------------- T H R E A D ---------------
Current thread (0x00235b00): JavaThread "main" [_thread_in_Java, id= 1116 ]
siginfo: ExceptionCode=0xc000008e, ExceptionInformation=0x00000000
Registers:
EAX=0x00000000, EBX=0x0000006e, ECX=0x00000000, EDX=0x26c13918
ESP=0x0006f600, EBP=0x0006f620, ESI=0x26c11218, EDI=0x0006f62c
EIP=0x00f3a9f9, EFLAGS=0x00010206
Top of Stack: (sp=0x0006f600)
0x0006f600: 3f800000 0006f604 26c11210 0006f62c
0x0006f610: 26c13918 00000000 26c11230 0006f628
0x0006f620: 0006f64c 00f32a7b 00000000 22b0e550
0x0006f630: 0006f630 26c110f9 0006f66c 26c13918
0x0006f640: 00000000 26c111a8 0006f66c 0006f68c
0x0006f650: 00f329fa 00000000 00000000 00000000
0x0006f660: 00000000 00000000 00000000 22b0e550
0x0006f670: 0006f670 26bb45ca 0006f69c 26bbdb60
Instructions: (pc=0x00f3a9f9)
0x00f3a9e9: 00 00 00 6e 00 00 00 d9 04 24 83 c4 04 d8 3c 24
0x00f3a9f9: d9 1c 24 d9 04 24 58 0f b6 5e 01 46 ff 24 9d 18
Stack: [0x00030000,0x00070000), sp=0x0006f600, free space=253k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
j com.sun.tools.javac.jvm.Items$ImmediateItem.isPosZero(F)Z+ 0
j com.sun.tools.javac.jvm.Items$ImmediateItem.load()Lcom/sun/tools/javac/jvm/Items$Item;+ 217
j com.sun.tools.javac.jvm.Gen.visitVarDef(Lcom/sun/tools/javac/tree/Tree$VarDef;)V+ 66
j com.sun.tools.javac.tree.Tree$VarDef.accept(Lcom/sun/tools/javac/tree/Tree$Visitor;)V+ 2
j com.sun.tools.javac.jvm.Gen.genDef(Lcom/sun/tools/javac/tree/Tree;Lcom/sun/tools/javac/comp/Env;)V+ 12
j com.sun.tools.javac.jvm.Gen.genStat(Lcom/sun/tools/javac/tree/Tree;Lcom/sun/tools/javac/comp/Env;)V+ 24
j com.sun.tools.javac.jvm.Gen.genStat(Lcom/sun/tools/javac/tree/Tree;Lcom/sun/tools/javac/comp/Env;I)V+ 10
j com.sun.tools.javac.jvm.Gen.genStats(Lcom/sun/tools/javac/util/List;Lcom/sun/tools/javac/comp/Env;)V+ 19
j com.sun.tools.javac.jvm.Gen.visitBlock(Lcom/sun/tools/javac/tree/Tree$Block;)V+ 31
j com.sun.tools.javac.tree.Tree$Block.accept(Lcom/sun/tools/javac/tree/Tree$Visitor;)V+ 2
j com.sun.tools.javac.jvm.Gen.genDef(Lcom/sun/tools/javac/tree/Tree;Lcom/sun/tools/javac/comp/Env;)V+ 12
j com.sun.tools.javac.jvm.Gen.genStat(Lcom/sun/tools/javac/tree/Tree;Lcom/sun/tools/javac/comp/Env;)V+ 24
j com.sun.tools.javac.jvm.Gen.genMethod(Lcom/sun/tools/javac/tree/Tree$MethodDef;Lcom/sun/tools/javac/comp/Env;Z)V+ 456
j com.sun.tools.javac.jvm.Gen.visitMethodDef(Lcom/sun/tools/javac/tree/Tree$MethodDef;)V+ 55
j com.sun.tools.javac.tree.Tree$MethodDef.accept(Lcom/sun/tools/javac/tree/Tree$Visitor;)V+ 2
j com.sun.tools.javac.jvm.Gen.genDef(Lcom/sun/tools/javac/tree/Tree;Lcom/sun/tools/javac/comp/Env;)V+ 12
j com.sun.tools.javac.jvm.Gen.genClass(Lcom/sun/tools/javac/comp/Env;Lcom/sun/tools/javac/tree/Tree$ClassDef;)Z+ 149
j com.sun.tools.javac.main.JavaCompiler.genCode(Lcom/sun/tools/javac/comp/Env;Lcom/sun/tools/javac/tree/Tree$ClassDef;)V+ 6
j com.sun.tools.javac.main.JavaCompiler.compile(Lcom/sun/tools/javac/util/List;)Lcom/sun/tools/javac/util/List;+ 795
j com.sun.tools.javac.main.Main.compile([Ljava/lang/String;Lcom/sun/tools/javac/util/Context;)I+ 350
j com.sun.tools.javac.main.Main.compile([Ljava/lang/String;)I+ 9
j com.sun.tools.javac.Main.compile([Ljava/lang/String;)I+ 12
j com.sun.tools.javac.Main.main([Ljava/lang/String;)V+ 102
v ~StubRoutines::call_stub
V [jvm.dll+0x8295c]
V [jvm.dll+0xd752e]
V [jvm.dll+0x8282d]
V [jvm.dll+0x898ac]
C [javac.exe+0x14d0]
C [javac.exe+0x66dd]
C [KERNEL32.DLL+0x87f5]
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x00ecf600 JavaThread "Low Memory Detector" daemon [_thread_blocked, id= 1196 ]
0x00ece100 JavaThread "CompilerThread0" daemon [_thread_blocked, id= 300 ]
0x00ea8c48 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id= 308 ]
0x0023f770 JavaThread "Finalizer" daemon [_thread_blocked, id= 960 ]
0x0023e2a8 JavaThread "Reference Handler" daemon [_thread_blocked, id= 1112 ]
=>0x00235b00 JavaThread "main" [_thread_in_Java, id= 1116 ]
Other Threads:
0x00e99a80 VMThread [id= 932 ]
0x00ed0a08 WatcherThread [id= 344 ]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 576K, used 380K [0x22ac0000, 0x22b60000, 0x22fa0000)
eden
[error occurred during error reporting, step 190 , id 0xc000008e]
Dynamic libraries:
0x00400000 - 0x0040e000 I:\java\jdk1. 5 .0_05\bin\javac.exe
0x77f80000 - 0x77ffb000 D:\WINNT\system32\ntdll.dll
0x7c2d0000 - 0x7c332000 D:\WINNT\system32\ADVAPI32.dll
0x7c4e0000 - 0x7c599000 D:\WINNT\system32\KERNEL32.DLL
0x77d30000 - 0x77da1000 D:\WINNT\system32\RPCRT4.DLL
0x78000000 - 0x78045000 D:\WINNT\system32\MSVCRT.dll
0x00250000 - 0x002c3000 c:\TEMP\fha1.tmp
0x71780000 - 0x7180a000 D:\WINNT\system32\COMCTL32.DLL
0x77f40000 - 0x77f7c000 D:\WINNT\system32\GDI32.dll
0x77e10000 - 0x77e75000 D:\WINNT\system32\USER32.DLL
0x76620000 - 0x76631000 D:\WINNT\system32\MPR.DLL
0x77a50000 - 0x77b47000 D:\WINNT\system32\OLE32.DLL
0x779b0000 - 0x77a4b000 D:\WINNT\system32\OLEAUT32.DLL
0x75050000 - 0x75058000 D:\WINNT\system32\WSOCK32.DLL
0x75030000 - 0x75044000 D:\WINNT\system32\WS2_32.DLL
0x75020000 - 0x75028000 D:\WINNT\system32\WS2HELP.DLL
0x6d640000 - 0x6d7cc000 I:\java\jdk1. 5 .0_05\jre\bin\client\jvm.dll
0x77570000 - 0x775a0000 D:\WINNT\system32\WINMM.dll
0x6d280000 - 0x6d288000 I:\java\jdk1. 5 .0_05\jre\bin\hpi.dll
0x690a0000 - 0x690ab000 D:\WINNT\system32\PSAPI.DLL
0x6d610000 - 0x6d61c000 I:\java\jdk1. 5 .0_05\jre\bin\verify.dll
0x6d300000 - 0x6d31d000 I:\java\jdk1. 5 .0_05\jre\bin\java.dll
0x6d630000 - 0x6d63f000 I:\java\jdk1. 5 .0_05\jre\bin\zip.dll
VM Arguments:
jvm_args: -Dapplication.home=I:\java\jdk1. 5 .0_05 -Xms8m -Xss4m -ea:com.sun.tools...
java_command: com.sun.tools.javac.Main Test.java
Environment Variables:
PATH=D:\WINNT\system32;D:\WINNT;D:\WINNT\System32\Wbem;\dos\;\dos\drivers\
USERNAME=pav
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0 , AuthenticAMD
--------------- S Y S T E M ---------------
OS: Windows 2000 Build 2195 Service Pack 4
CPU:total 1 family 6 , cmov, cx8, fxsr, mmx, sse
Memory: 4k page, physical 523760k(188292k free), swap 1539620k(1222192k free)
vm_info: Java HotSpot(TM) Client VM ( 1 . 5 .0_05-b05) for windows-x86, built on Aug 26 2005 15 : 36 : 02 by "java_re" with MS VC++ 6 . 0
Попробовал другим компилятором jdk1.4.1 , выдал следующее:
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54.
I:\java\jdk1. 4 . 1 \bin>javac Test.java
Unexpected Signal : EXCEPTION_FLT_DIVIDE_BY_ZERO occurred at PC=0xE9A626
Function=[Unknown.]
Library=(N/A)
NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.
Current Java thread:
Dynamic libraries:
0x00400000 - 0x00408000 I:\java\jdk1. 4 . 1 \bin\javac.exe
0x77F80000 - 0x77FFB000 D:\WINNT\system32\ntdll.dll
0x7C2D0000 - 0x7C332000 D:\WINNT\system32\ADVAPI32.dll
0x7C4E0000 - 0x7C599000 D:\WINNT\system32\KERNEL32.DLL
0x77D30000 - 0x77DA1000 D:\WINNT\system32\RPCRT4.DLL
0x78000000 - 0x78045000 D:\WINNT\system32\MSVCRT.dll
0x00250000 - 0x002C3000 c:\TEMP\fha1.tmp
0x71780000 - 0x7180A000 D:\WINNT\system32\COMCTL32.DLL
0x77F40000 - 0x77F7C000 D:\WINNT\system32\GDI32.dll
0x77E10000 - 0x77E75000 D:\WINNT\system32\USER32.DLL
0x76620000 - 0x76631000 D:\WINNT\system32\MPR.DLL
0x77A50000 - 0x77B47000 D:\WINNT\system32\OLE32.DLL
0x779B0000 - 0x77A4B000 D:\WINNT\system32\OLEAUT32.DLL
0x75050000 - 0x75058000 D:\WINNT\system32\WSOCK32.DLL
0x75030000 - 0x75044000 D:\WINNT\system32\WS2_32.DLL
0x75020000 - 0x75028000 D:\WINNT\system32\WS2HELP.DLL
0x6D340000 - 0x6D46A000 I:\java\jdk1. 4 . 1 \jre\bin\client\jvm.dll
0x77570000 - 0x775A0000 D:\WINNT\system32\WINMM.dll
0x6D1E0000 - 0x6D1E7000 I:\java\jdk1. 4 . 1 \jre\bin\hpi.dll
0x6D310000 - 0x6D31E000 I:\java\jdk1. 4 . 1 \jre\bin\verify.dll
0x6D220000 - 0x6D239000 I:\java\jdk1. 4 . 1 \jre\bin\java.dll
0x6D330000 - 0x6D33D000 I:\java\jdk1. 4 . 1 \jre\bin\zip.dll
0x77920000 - 0x77943000 D:\WINNT\system32\imagehlp.dll
0x72A00000 - 0x72A2D000 D:\WINNT\system32\DBGHELP.dll
0x690A0000 - 0x690AB000 D:\WINNT\system32\PSAPI.DLL
Local Time = Thu Dec 08 01 : 36 : 00 2005
****************
Another exception has been detected while we were handling last error.
Dumping information about last error:
ERROR REPORT FILE = (N/A)
PC = 0x00E9A626
SIGNAL = - 1073741682
FUNCTION NAME = (N/A)
OFFSET = 0xFFFFFFFF
LIBRARY NAME = (N/A)
Please check ERROR REPORT FILE for further information, if there is any.
Good bye.
Пожалуйста, объясните что это могло быть? Может вирус какой у меня на компьютере? Другого объяснения я не нахожу...
|
|
|