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

Complier throw error: java.lang.AssertionError: Value of x -1

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      os_x

      Description

      ADDITIONAL SYSTEM INFORMATION :
      Bug Database (http://bugs.java.com) Java Bug (http://bugreport.java.com) Bug
      java.lang.AssertionError: Value of x -1
      at com.sun.tools.javac.util.Assert.error(Assert.java:133)
      at com.sun.tools.javac.util.Assert.check(Assert.java:94)
      at com.sun.tools.javac.util.Bits.incl(Bits.java:186)

      A DESCRIPTION OF THE PROBLEM :
      FOR JSR269 I changed the JAVA method, and print it on the terminal
      It`s OK for the grammar
      If I change a new operation system(centos) and recompile it, it`s OK.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      command: mvn clean package
      for each maven project

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Compile SUCCESS
      ACTUAL -
      Bug Database (http://bugs.java.com) Java Bug (http://bugreport.java.com)
      java.lang.AssertionError: Value of x -1
      at com.sun.tools.javac.util.Assert.error(Assert.java:133)
      at com.sun.tools.javac.util.Assert.check(Assert.java:94)
      at com.sun.tools.javac.util.Bits.incl(Bits.java:186)
      at com.sun.tools.javac.comp.Flow$AssignAnalyzer.initParam(Flow.java:1858)
      at com.sun.tools.javac.comp.Flow$AssignAnalyzer.visitMethodDef(Flow.java:1807)
      at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:778)
      at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
      at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:404)
      at com.sun.tools.javac.comp.Flow$AssignAnalyzer.scan(Flow.java:1382)
      at com.sun.tools.javac.comp.Flow$AssignAnalyzer.visitClassDef(Flow.java:1749)
      at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:693)
      at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
      at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:404)
      at com.sun.tools.javac.comp.Flow$AssignAnalyzer.scan(Flow.java:1382)
      at com.sun.tools.javac.comp.Flow$AssignAnalyzer.analyzeTree(Flow.java:2446)
      at com.sun.tools.javac.comp.Flow$AssignAnalyzer.analyzeTree(Flow.java:2429)
      at com.sun.tools.javac.comp.Flow.analyzeTree(Flow.java:211)
      at com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1327)
      at com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1296)
      at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:901)
      at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:860)
      at com.sun.tools.javac.main.Main.compile(Main.java:523)
      at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
      at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)
      at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:126)
      at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:169)
      at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:785)
      at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:192)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      [INFO] -------------------------------------------------------------

      ---------- BEGIN SOURCE ----------
              final JCTree.JCClassDecl classDecl = (JCTree.JCClassDecl) processor.trees.getTree(clazz);
              final JCTree.JCMethodDecl methodDecl = (JCTree.JCMethodDecl) processor.trees.getTree(method);
              methodDecl.accept(new TreeTranslator() {
                  public void visitMethodDef(JCTree.JCMethodDecl mtd) {
                      //
                      mtd.name = mtd.name.append(mtd.name.table.fromString("_sentinel"));
                      //
                      mtd.sym.resetAnnotations();

                      super.visitMethodDef(mtd);
                  }
              });


      this method is in AbstractProcessor#process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv)
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      use another operation system

      FREQUENCY : often


        Attachments

          Issue Links

            Activity

              People

              Assignee:
              fmatte Fairoz Matte
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: