JDK 1.5.0_07 오류 관련

다음과 같은 오류가 나타났는데 여기저기 검색 결과 File 클래스의 deleteOnExit() 메소드에 버그가 있어 발생한 오류라고 한다.

JVM Hotspot Error
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# SIGSEGV (0xb) at pc=0x008a6a86, pid=9790, tid=3086878400
#
# Java VM: Java HotSpot(TM) Server VM (1.5.0_07-b03 mixed mode)
# Problematic frame:
# C [libc.so.6+0x68a86] strcpy+0x26


다음 코드로 해당 JVM이 버그가 있는 버전인지 확인할 수 있다.
public class J2SEVulnerabilityTest {
  private static final int PATH_MAX = 4096;

  private static String generateArbitraryLengthOfString(int n) {
    StringBuffer buf = new StringBuffer(n);
    while (--n >= 0) {
      buf.append('#');
    }
    return buf.toString();
  }

  public static void main(String[] args) {
    File f = new File(generateArbitraryLengthOfString(PATH_MAX + 512));
    f.deleteOnExit();
  }
}


이미 버그 패치되었다고 하니 최신 버전을 받아 설치하면 해결되지 않을까 생각한다.

버그 리포트는 다음 참고

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6332120
크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by 김형준


Trackback URL : http://www.jaso.co.kr/trackback/129

Leave a comment
« Previous : 1 : ... 289 : 290 : 291 : 292 : 293 : 294 : 295 : 296 : 297 : ... 388 : Next »