Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to skip class file parse errors #173

Closed
vlsi opened this issue Sep 1, 2020 · 19 comments · Fixed by #174
Closed

Ability to skip class file parse errors #173

vlsi opened this issue Sep 1, 2020 · 19 comments · Fixed by #174
Assignees
Milestone

Comments

@vlsi
Copy link
Contributor

vlsi commented Sep 1, 2020

I've tried de.thetaphi.forbiddenapis.version=3.0.1 and the error is still there, so I guess the's ASM issue.

I've a case when forbidden-apis task fails with ArrayIndexOutOfBoundsException, and it looks like there's no way to proceed :-/

CI failure: https://github.com/apache/calcite/runs/1058616825?check_suite_focus=true#step:6:430
Code: apache/calcite#1929

Unfortunately, the exception does not tell which of the classes failed to parse, and there's no way to skip the failure.

Could you please print "unparseable" class file names in the warning messages and provide users the ability to skip unparseable class files?
I think it would be OK to skip the analysis by default in case ASM fails to parse the file.

Here's the stacktrace:

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':core:forbiddenApisMain'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:208)
        at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:263)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:206)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:187)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:114)
        at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:62)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:409)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:399)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:242)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:150)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:94)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
        at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:41)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:372)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:359)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:352)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:338)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 116 out of bounds for length 34
        at de.thetaphi.forbiddenapis.asm.ClassReader.readLabel(ClassReader.java:2650)
        at de.thetaphi.forbiddenapis.asm.ClassReader.createLabel(ClassReader.java:2666)
        at de.thetaphi.forbiddenapis.asm.ClassReader.readTypeAnnotations(ClassReader.java:2732)
        at de.thetaphi.forbiddenapis.asm.ClassReader.readCode(ClassReader.java:1899)
        at de.thetaphi.forbiddenapis.asm.ClassReader.readMethod(ClassReader.java:1488)
        at de.thetaphi.forbiddenapis.asm.ClassReader.accept(ClassReader.java:718)
        at de.thetaphi.forbiddenapis.asm.ClassReader.accept(ClassReader.java:401)
        at de.thetaphi.forbiddenapis.Checker.checkClass(Checker.java:409)
        at de.thetaphi.forbiddenapis.Checker.run(Checker.java:440)
        at de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis.checkForbidden(CheckForbiddenApis.java:601)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.run(ExecuteActionsTaskExecuter.java:570)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:395)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:387)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:242)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:150)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:84)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:555)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:538)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access$300(ExecuteActionsTaskExecuter.java:109)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.executeWithPreviousOutputFiles(ExecuteActionsTaskExecuter.java:279)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.execute(ExecuteActionsTaskExecuter.java:268)
        at org.gradle.internal.execution.steps.ExecuteStep.lambda$execute$1(ExecuteStep.java:33)
        at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:33)
        at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:26)
        at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:67)
        at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:36)
        at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:49)
        at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:34)
        at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:43)
        at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:73)
        at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:54)
        at org.gradle.internal.execution.steps.CatchExceptionStep.execute(CatchExceptionStep.java:34)
        at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:44)
        at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:54)
        at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:38)
        at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:49)
        at org.gradle.internal.execution.steps.CacheStep.executeWithoutCache(CacheStep.java:159)
        at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:72)
        at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:43)
        at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:44)
        at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:33)
        at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:38)
        at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:24)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:92)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:85)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:55)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:39)
        at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:76)
        at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:37)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:36)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:26)
        at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:94)
        at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:49)
        at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:79)
        at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:53)
        at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:74)
        at org.gradle.internal.execution.steps.SkipEmptyWorkStep.lambda$execute$2(SkipEmptyWorkStep.java:78)
        at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:78)
        at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:34)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:39)
        at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:40)
        at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:28)
        at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:33)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:195)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:187)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:114)
        at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:62)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:409)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:399)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:242)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:150)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:94)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
        at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:41)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:372)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:359)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:352)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:338)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
@uschindler
Copy link
Member

Hi @vlsi,
thanks for opening the issue. First of all: This is not a bug in forbiddenapis respective the underlying class library ASM. What you see here is really incorrect class files. This is a well known issue with Java 8's javac compiler, which creates incorrect classes when you are using some constellations of type arguments (i think your issue is about @nonnull). There are actually 3 bugs, some of them were backported to Java 8, but the one we see here is only fixed in Java 10's javac.

You may not see the error when you run the program (although Java's bytecode verifier should complain about this), but all analysis code will have to work around it, so the @nonnull should really be removed in your code.

The problem of forbiddenapis is only, that you can't see the class which causes the problem :-) I can for sure fix this, by catching exception and rethroing it with class name of parsed class appended. In general the exception is not typed, so it's a bad idea to just "ignore" that class. Because AIOOBE can be thrown anywhere and generally is a bug in the code, so catching and swallowing is a bad idea.

My proposal: Give me a short snippet to trigger that bug (tell me what to checkout and what to run), so I can figure out for you which class file on your side causes the bug. In a later verison of forbiddenapis I will add a better error reporting when parsing with ASM fails with RuntilException subclasses.

The correct way to handle this on your side is:

  • Remove the @nonnull or similar annotation at the problematic class and add a TODO to add it once the minimal java version of Calcite is raised to Java 11 (away from 8)
  • or alternatively just add the broken class file to the "exclude" property of the forbiddenapis call.

@uschindler uschindler self-assigned this Sep 2, 2020
@uschindler uschindler added this to the 3.1 milestone Sep 2, 2020
@uschindler
Copy link
Member

Background:

So I will also close the underlying issue as "won't fix, because the class files are broken and manual care has to be taken to either fix the class files - they should never be released in this broken state on Maven Central!!! - or exclude them manually.

I will just create a pull request to give better information. To quickly help you and get out of the issue and figure out which class is causing this, it might me a good idea to run AsmVerifier to check all class files.

@vlsi
Copy link
Contributor Author

vlsi commented Sep 2, 2020

Because AIOOBE can be thrown anywhere and generally is a bug in the code, so catching and swallowing is a bad idea.

forbidden-apis could catch the exception from parsing the class and convert it to a warning.

@uschindler
Copy link
Member

uschindler commented Sep 2, 2020

forbidden-apis could catch the exception from parsing the class and convert it to a warning.

No, that wont happen. Excactly for that case you are free to put classes on exclude list. The problem is that ASM does not return proper exceptions, so you can't for sure differentiate between a bug in forbiddenapis code and a broken class file. I tried my best in the given PR #174, but converting it to a warning should not be done.

Pull request is here: #174

@uschindler
Copy link
Member

uschindler commented Sep 2, 2020

In short: The ability is there to ignore classes, but that must be done explicit: Use Gradle exclude '**/Classname.class' or similar.

@uschindler
Copy link
Member

My strong recommendation is: Remove the @nonnull in your code for the cases that produce broken class files! Otherwise this may cause horrible bugs for frameworks using Calcite (like Servlet Containers parsing class files).

@uschindler
Copy link
Member

uschindler commented Sep 2, 2020

Hi,
wth the mentioned Pull Request, here's the problematic class:

Execution failed for task ':core:forbiddenApisMain':
Caused by: de.thetaphi.forbiddenapis.ForbiddenApiException: Failed to parse class 'org.apache.calcite.runtime.ResultSetEnumerable' (ResultSetEnumerable.java): java.lang.ArrayIndexOutOfBoundsException: 8

I will add it to exclude list and check the others.

@uschindler
Copy link
Member

Hi,
that's the only bad guy. After adding this to the list of excludes, the build of calcite (gradlew forbiddenApis) passes:

"**/org/apache/calcite/runtime/ResultSetEnumerable.class"

You can use this as a workaround for now. I have checked the source code file and your changes, it's not clear which of the above listed bugs cause this.

But be warned, any consumer of Calcite using this class with some framewroks may fail in same way!

@uschindler
Copy link
Member

The bug is a well known Java 8:

The problem are @nullable used inside a try...catch. After removing the @nullable from two places, it passes.

So unless you want to take the risk of producing broken class files, I'd recommend to change line 100 and 439 of RusltSetEnumerable to not use @nullable.

The bug is described here: https://gitlab.ow2.org/asm/asm/-/issues/317886 (not sure which one is the correct javac bug)

@vlsi
Copy link
Contributor Author

vlsi commented Sep 2, 2020

"**/org/apache/calcite/runtime/ResultSetEnumerable.class"

Ah, the same class causes checkerframework crash: typetools/checker-framework#3612 :)

I guess the class begs refactoring to become more compiler-friendly :)

@uschindler
Copy link
Member

I assume checkerframework uses ASM internally, too.

@vlsi
Copy link
Contributor Author

vlsi commented Sep 2, 2020

I assume checkerframework uses ASM internally, too.

It seems to crash for a different reason: it works OK for annotated version, and it crashes when annotations are missing.

If I have both checkerframework and forbidden-apis, it crashes in any case :)

@uschindler
Copy link
Member

See my comments in your pull request, I have a fix to maybe also fix both issues. Problem seems "lambda inside other lamda" f*cking up javac and maybe also checkerframework.

@uschindler
Copy link
Member

One question out of interest: Is forbiddenapis also checking your kotlin classes? This would really be interesting. Actually, it should do this, if the SourceSet contains all classes, but I haven't verified.

@uschindler
Copy link
Member

I verified - it does! COOL :-)

(I just injected a bad class file into build/test/kotlin).

@vlsi
Copy link
Contributor Author

vlsi commented Sep 2, 2020

We don't have much Kotlin yet: it is configured only for test classes. Good to know it parses Kotlin-generated bytecode as well :-)

vlsi added a commit to vlsi/calcite that referenced this issue Sep 2, 2020
uschindler added a commit that referenced this issue Sep 2, 2020
Add better reporting if ASM fails to parse a class with an unspecified RuntimeException
@uschindler
Copy link
Member

Hi,
the fix for better parse error reporting well be in next release. As a new Java version is coming out soon, it should not take too long. I am just waiting for a release of next Major ASM version and the final release candidate to pass all tests.

@uschindler
Copy link
Member

uschindler commented Sep 2, 2020

About the comments to print some more information when forbiddenapis crushes with a RuntimeException is a separate issue. It will then provide classfile and/or version number as a log entry.

The issue here was more about ASM not able to parse error, which is a bug in input data so needs to be handled differently.

@uschindler
Copy link
Member

I opened an issue about the additional "parsing state" printed to error logger in case of exception: #175

vlsi added a commit to vlsi/calcite that referenced this issue Sep 6, 2020
vlsi added a commit to vlsi/calcite that referenced this issue Sep 9, 2020
vlsi added a commit to vlsi/calcite that referenced this issue Sep 17, 2020
vlsi added a commit to vlsi/calcite that referenced this issue Sep 17, 2020
vlsi added a commit to vlsi/calcite that referenced this issue Sep 18, 2020
vlsi added a commit to vlsi/calcite that referenced this issue Sep 22, 2020
vlsi added a commit to vlsi/calcite that referenced this issue Sep 26, 2020
vlsi added a commit to vlsi/calcite that referenced this issue Sep 26, 2020
vlsi added a commit to vlsi/calcite that referenced this issue Sep 26, 2020
vlsi added a commit to vlsi/calcite that referenced this issue Oct 1, 2020
vlsi added a commit to vlsi/calcite that referenced this issue Oct 1, 2020
vlsi added a commit to vlsi/calcite that referenced this issue Oct 1, 2020
vlsi added a commit to vlsi/calcite that referenced this issue Oct 1, 2020
vlsi added a commit to vlsi/calcite that referenced this issue Oct 1, 2020
vlsi added a commit to vlsi/calcite that referenced this issue Oct 6, 2020
vlsi added a commit to vlsi/calcite that referenced this issue Oct 6, 2020
vlsi added a commit to vlsi/calcite that referenced this issue Oct 7, 2020
vlsi added a commit to vlsi/calcite that referenced this issue Oct 7, 2020
vlsi added a commit to apache/calcite that referenced this issue Oct 8, 2020
MalteBellmann pushed a commit to caespes/calcite that referenced this issue Feb 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants