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

Faulting location incorrect if executable uses ASLR. #58

Closed
SteelT1 opened this issue Nov 3, 2021 · 3 comments
Closed

Faulting location incorrect if executable uses ASLR. #58

SteelT1 opened this issue Nov 3, 2021 · 3 comments
Labels

Comments

@SteelT1
Copy link

SteelT1 commented Nov 3, 2021

Used MSYS2 mingw32 to compile the sample program.

I noticed the AddrPC of where the crashing code occurred would not match where it's actually located.
Compiling the sample program with -Wl,--disable-dynamicbase passed to the linker shows the correct AddrPC.
Top is the sample program without the flag set and bottom is the sample program with the flag set.
000E50E2
004050E2
In addtion gdb shows no file and line number when setting a breakpoint and addr2line will just output ??:0.

@SteelT1 SteelT1 changed the title Faulting location incorrect if executable has reloc section. Faulting location incorrect if executable uses ASLR. Nov 3, 2021
@alvinhochun
Copy link
Contributor

Related: #32

@jrfonseca jrfonseca added the bug label Apr 10, 2022
@jrfonseca
Copy link
Owner

I haven't had opportunity to reproduce this, but perhaps @alvinhochun 's 204887a change fixes this.

@jrfonseca
Copy link
Owner

I haven't tried MSYS2, but I believe this is fixed from DrMinGW side AFAICT. I've started running tests with ASLR with 75a6349 and nothing failed. Please reopen if issues persist.

Note that issues with MSYS2's gdb and binutils's addr2line are beyond my control.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants