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

Fix of NoClassDefFoundError due to unintended Lincheck analysis of StackTraceElement methods #423

Merged
merged 4 commits into from
Nov 18, 2024

Conversation

eupp
Copy link
Collaborator

@eupp eupp commented Nov 8, 2024

This PR fixes issue #376

It implements a quick bug fix specifically for #376, but does not completely solve the root problem described in #419.
This problem in general is more ubiquitous, requires more complicated changes, and thus would be addressed by a separate PR.

The fix implemented in this PR wraps all methods from java.lang.StackTraceElement class into ignored sections.
This is required due to a combination of two reasons:

  1. StackTraceElement own bytecode is not analyzed, but it can call methods from java.util (e.g., HashMap), which are analyzed by the Lincheck.
  2. StackTraceElement methods can be called almost from any point during execution (e.g., they are called when an exeption is thrown and its stack trace is being collected).

Thus, in order to ensure that StackTraceElement code is not analyzed by the Lincheck, we need to wrap its methods into an ignored section.

@ndkoval ndkoval merged commit df90234 into develop Nov 18, 2024
15 checks passed
@ndkoval ndkoval deleted the 376-no-class-def-found-bugfix branch November 18, 2024 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants