Skip to content

Major refactor #6

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

Closed
wants to merge 63 commits into from
Closed

Major refactor #6

wants to merge 63 commits into from

Conversation

Machiry
Copy link
Collaborator

@Machiry Machiry commented Jun 24, 2019

This is a major refactoring of the current implementation.
Following are the major changes in this pull request:

  1. Correct handling of in-scope and external constraint variables: There were many places where this was not handled correctly. Furthermore, the behavior of the current implementation depends a lot on whether a declaration exists for a function or not, However, this should not be the case, irrespective of whether the declaration exists or not, we should have the same behavior. I have implemented this by creating a dummy constraint variables when a declaration doesn't exist for a function (This is also what Dr. Hicks suggested).
  2. Modularizing code: There were several places where the same code was repeated multiple times and I have created functions for the duplicated code.
  3. Functionality Tests: Although we have unit tests, there are no functionality tests. I have added several functionality tests and a simple script to verify them.
  4. Minor stuff: JSON output, making the merging of multiple declarations optional.

If you think it will make it easy, we can schedule a meeting and I can explain my changes which could give you more context to review the changes.

Pointer detection improvement (on IceCast): Ptr: 27%, NtArr: 87%, Arr: 93%

rchyena and others added 30 commits June 4, 2019 23:20
This change allows for all statements to bubble up through the
analysis engine, not just declaration statements.
Comments will appear at the end of the line in which they are defined.

NOTE: The Checked C type rewriting pass must occur first.  Otherwise,
it may overwrite any changes added during prior rewriting passes.
Merging into master after debugging NT issue.
Machiry and others added 23 commits June 24, 2019 22:30
…FunctionDecl. However, using function definition only for return values
@Machiry
Copy link
Collaborator Author

Machiry commented Jul 10, 2019

We also fixed:

checkedc#622

@rchyena
Copy link

rchyena commented Jul 27, 2019

We incorporated these commits through PR #642 on Microsoft's repo.

@rchyena rchyena closed this Jul 27, 2019
@Machiry Machiry deleted the major_refactor branch August 30, 2019 19:49
Machiry pushed a commit that referenced this pull request May 17, 2020
If a core file has an EFI version string which includes a UUID
(similar to what it returns for the kdp KDP_KERNELVERSION packet)
in the LC_IDENT or LC_NOTE 'kern ver str' load command.  In that
case, we should try to find the binary and dSYM for the UUID
listed.  The dSYM may have python code which knows how to relocate
the binary to the correct address in lldb's target section load
list and loads other ancillary binaries.

The test case is a little involved,

1. it compiles an inferior hello world apple (a.out),
2. it compiles a program which can create a corefile manually
   with a specific binary's UUID encoded in it,
3. it gets the UUID of the a.out binary,
4. it creates a shell script, dsym-for-uuid.sh, which will
   return the full path to the a.out + a.out.dSYM when called
   with teh correct UUID,
5. it sets the LLDB_APPLE_DSYMFORUUID_EXECUTABLE env var before
   creating the lldb target, to point to this dsym-for-uuid.sh,
6. runs the create-corefile binary we compiled in step #2,
7. loads the corefile from step #6 into lldb,
8. verifies that lldb loaded a.out by reading the LC_NOTE
   load command from the corefile, calling dsym-for-uuid.sh with
   that UUID, got back the path to a.out and loaded it.

whew!

<rdar://problem/47562911>

llvm-svn: 366378
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants