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

[Java-Integration]: Fix bug #568

Merged
merged 2 commits into from
Oct 25, 2022
Merged

Conversation

arthurscchan
Copy link
Contributor

Fix two bugs for Issue #536 Step 3~4:

  1. Old code forget to remove.
  2. Logic of call graph extraction and method depth calculation does not consider looping or recursive code. These kind of code will generate circular edge in the callgraph which will cause infinitely loop when the visitor trace the code following those circular edges. This will end with StackOverflowError and fail the execution. New logic fixed that by recording method that has already been handled to avoid infinitely loop.

Signed-off-by: Arthur Chan arthur.chan@adalogics.com

Fix bug

Verified

This commit was signed with the committer’s verified signature.
renovate-bot Mend Renovate
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
@arthurscchan
Copy link
Contributor Author

temp.txt
The above text file is a sample result generated for the jackson-databind project on the AdaLObjectReader3Fuzzer. It contains the call graph and the extra document information. Sample of the call graph shown below.

Call Tree
fuzzerTestOneInput AdaLObjectReader3Fuzzer linenumber=-1
  <clinit> AdaLObjectReader3Fuzzer$NoCheckSubTypeValidator linenumber=193
    <clinit> java.util.HashSet linenumber=556
    <init> AdaLObjectReader3Fuzzer$NoCheckSubTypeValidator linenumber=563
      <clinit> AdaLObjectReader3Fuzzer$NoCheckSubTypeValidator linenumber=561
      <init> com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator$Base linenumber=549
    add java.util.HashSet linenumber=557
    <init> java.util.HashSet linenumber=556
    <clinit> java.lang.Object linenumber=556
      registerNatives java.lang.Object linenumber=43
    <clinit> java.util.Collections linenumber=558
    unmodifiableSet java.util.Collections linenumber=558
  <init> com.fasterxml.jackson.core.JsonFactory linenumber=423
  <init> AdaLObjectReader3Fuzzer$MockFuzzDataInput linenumber=414
    <clinit> java.lang.Object linenumber=600
    <init> java.io.ByteArrayInputStream linenumber=600
    getBytes java.lang.String linenumber=600
      <clinit> java.lang.Throwable linenumber=940
        <clinit> java.lang.Object linenumber=115
        desiredAssertionStatus java.lang.Class linenumber=115
          <clinit> java.lang.Class linenumber=3476
            <clinit> java.lang.Object linenumber=163
            registerNatives java.lang.Class linenumber=163
          desiredAssertionStatus java.lang.ClassLoader linenumber=3482
          getName java.lang.Class linenumber=3482
            initClassName java.lang.Class linenumber=793
          getClassLoader0 java.lang.Class linenumber=3473
......

@DavidKorczynski DavidKorczynski merged commit 911a62c into ossf:main Oct 25, 2022
@arthurscchan arthurscchan deleted the fix-bug branch October 29, 2022 00:10
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.

None yet

2 participants