You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please adjust the code that we can find the thread_arena for that section too.
For this, I think with the current techniques we have, it's hard to handle it on different glibc versions and architecture with this approach, so I think a hard-coded patch to adjust the code just for this case might not be a good idea, since it will eventually fail or its result will be falsely positive in the future glibc version and make the code here dirtier and dirtier each time we try to adjust it again for another failing case.
So instead of adjusting it, in the latest commit, we provide an optional way to brute force it if all of the arenas didn't corrupt.
But it might not reliable and slow in some cases, so if the number of arenas doesn't large, I'll suggest you manually determine it and set it with set thread-arena <the address>, and it should not be too hard to find which arena your current thread using after some tests.
(I know the new method sounds stupid, but I guess it's the only thing we can do now.
If you have better ideas, or probably a way to do code simulation or something instead of only filtering the disassembly result, PR is welcome!)
Here we can see the calculation of
thread_arena
for stripped ARM GLIBC.That code guess the section in
calloc
function looks like:In some GLIBC it's look different, for example armv7-eabihf--glibc--stable-2017.05-toolchains this section looks like:
(This libc is not stripped to help this issue , but I found some stripped ARM GLIBC with that section)
Please adjust the code that we can find the
thread_arena
for that section too.@lebr0nli
The text was updated successfully, but these errors were encountered: