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

Glibc* class now rely on ctypes.Structure #869

Merged
merged 8 commits into from Jul 10, 2022
Merged

Glibc* class now rely on ctypes.Structure #869

merged 8 commits into from Jul 10, 2022

Conversation

hugsy
Copy link
Owner

@hugsy hugsy commented Jul 3, 2022

Description/Motivation/Screenshots

To parse the heap, the old way of either relying on the symbol malloc_state or our own class MallocStateStruct both had issues.
This PR addresses this by simplifying the code and implementing our own ctypes.Structure for both GlibcArena and GlibcHeapInfo. This has the huge advantage taht we can tweak easily the structure themselves as the libc changes them. This is way less error-prone (#854 is one of the latest example of error due to bad offset)

Against which architecture was this tested ?

"Tested" indicates that the PR works and the unit test (i.e. make test) run passes without issue.

  • x86-32
  • x86-64
  • ARM
  • AARCH64
  • MIPS
  • POWERPC
  • SPARC
  • RISC-V

Checklist

  • My PR was done against the dev branch, not main.
  • My code follows the code style of this project.
  • My change includes a change to the documentation, if required.
  • If my change adds new code, adequate tests have been added.
  • I have read and agree to the CONTRIBUTING document.

@hugsy hugsy added this to the Release: next milestone Jul 3, 2022
@hugsy hugsy mentioned this pull request Jul 4, 2022
13 tasks
@hugsy hugsy merged commit ad1bfaf into dev Jul 10, 2022
@hugsy hugsy deleted the heap_bugz branch July 10, 2022 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant