microsoft / microsoft/Detours

Maybe a potential issue in detour_alloc_region_from_hi function

Open
#330 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
6.4k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

https://github.com/microsoft/Detours/blob/b2bf32a657be1114b173ad28d2d65463ca4c466f/src/detours.cpp#L1385-L1408

It seems detour_alloc_region_from_hi should try alloc something with the address related to "mbi.BaseAddress", but detour_alloc_round_down_to_region in that snippet uses "mbi.AllocationBase".

I get that information when I chatting with my friends. I try to find why introduce the "mbi.AllocationBase" in that snippet but I'm finally confused. So, I think I should post an issue for ask.

Kenji Mouri

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/detours.cpp at lines 1385-1408 and trace detour_alloc_region_from_hi through detour_alloc_round_down_to_region. Compare the roles of mbi.BaseAddress and mbi.AllocationBase in this allocation path, then determine whether the code needs a change or the issue needs a documented explanation. No test entry point is mentioned.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.