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 find_fake_fast command test #1397

Merged
merged 1 commit into from
Nov 30, 2022
Merged

Fix find_fake_fast command test #1397

merged 1 commit into from
Nov 30, 2022

Conversation

CptGibbon
Copy link
Contributor

Introduce a more reliable method for mapping one of the fake chunks used in this suite of tests.

Part of the test setup requires the fake_chunk size field to be aligned in virtual memory such that its heap_info struct resides in unmapped memory. Previously this was left up to ASLR and the test would intermittently fail when the fake chunk's heap_info struct was actually mapped. The updated test attempts to mmap() 2 pages aligned to HEAP_MAX_SIZE, when successful it places fake_chunk in the 2nd page then munmap()s the 1st page, ensuring the fake chunk's heap_info struct is unmapped.

Use a more reliable method for mapping one of the fake chunks such that its heap_info struct is guaranteed to be unmapped.
@codecov-commenter
Copy link

Codecov Report

Merging #1397 (0ad61d3) into dev (5a0e229) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##              dev    #1397   +/-   ##
=======================================
  Coverage   58.14%   58.14%           
=======================================
  Files         155      155           
  Lines       19582    19582           
  Branches     1840     1840           
=======================================
  Hits        11385    11385           
  Misses       7636     7636           
  Partials      561      561           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@CptGibbon
Copy link
Contributor Author

Failing tests appear unrelated to this PR:

Docker build (ubuntu 18.04) - Failing tests: tests/test_cymbol.py::test_cymbol
Docker build (archlinux) - Seems to be an issue in setup.py

@disconnect3d disconnect3d merged commit 2d537b5 into pwndbg:dev Nov 30, 2022
@CptGibbon CptGibbon deleted the fix-find-fake-fast-test branch November 30, 2022 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants