Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8022154

java interpreter dumps core if filename given after -jar starts with a hyphen

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 7u25
    • tools
    • linux_redhat_5.0

      FULL PRODUCT VERSION :
      java version " 1.7.0_25 "
      Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
      Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Linux got001790 2.6.32-358.11.1.el6.x86_64 #1 SMP Wed May 15 10:48:38 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux


      A DESCRIPTION OF THE PROBLEM :
      The " java " command line tool dumps core when the command line argument after -jar starts with a hyphen.

      Here is a stack trace form gdb:

      Let me know if I can assist you with more information.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      java -jar -a

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      An error message telling me the file " -a " can't be found.
      ACTUAL -
      $ java -jar -a
      Segmentation fault (core dumped)
      $


      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Core was generated by `java -jar -a'.
        Program terminated with signal 11, Segmentation fault.
      #0 0x0000003a65527a38 in __strchr_sse42 () from /lib64/libc.so.6
      Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.107.el6_4.2.x86_64 java-1.7.0-oracle-1.7.0.25-1jpp.1.el6_4.x86_64
      (gdb) bt
      #0 0x0000003a65527a38 in __strchr_sse42 () from /lib64/libc.so.6
      #1 0x0000003a65c073ef in JLI_WildcardExpandClasspath () from /usr/lib/jvm/java-1.7.0-oracle-1.7.0.25.x86_64/jre/bin/../lib/amd64/jli/libjli.so
      #2 0x0000003a65c05984 in JLI_Launch () from /usr/lib/jvm/java-1.7.0-oracle-1.7.0.25.x86_64/jre/bin/../lib/amd64/jli/libjli.so
      #3 0x00000000004006a6 in main ()
      (gdb)

      I have not found any hs_err_pidXXX.log file.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      Ensure the JVM is never invoked this way.

            ksrini Kumar Srinivasan
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: