-
Notifications
You must be signed in to change notification settings - Fork 571
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
crash in privload_call_lib_func i386 , when use client with drrun. #4200
Comments
It seems, this commit import the bug |
I confirm this is happening on my machine too. It seems that this is not just a particular issue of libinscount.so but also other samples. What I noted is that if I I run it under debug mode it works right?
|
Also, what gcc version are you using please? |
gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1) |
I comment the assembly code in privload_call_lib_func, and it works
|
@derekbruening any idea what is wrong since it seems that it concerns your commit? If you do not got time, I'll try and have a look at a fix. |
No, the asm looks fine. Maybe we should go ahead and abandon the 4-byte stack alignment. Maybe a good time for it if we put out a new DR release afterward (better now than after). |
@johnfxgalea if you have time to switch to 16-byte stack alignment everywhere, and I get #3995 finished, we may be all set then for the 8.0 release (except we have to figure out #4126 which is blocking all package builds including an 8.0 one...) |
Sure. What do you mean everywhere? Are there more cases than just the one mentioned by OP? |
See #3966 (comment) |
I take it back: as @johnfxgalea said, there is no crash in debug build. In release I can reproduce the up-front crash. But without eab941b it still crashes, at exit. @johnfxgalea unless you already have this in a branch I'll take it. I just did an experiment and doing the proposed switch to 16-byte stack alignment does fix the release build crash on my machine. |
Abandons the 4-byte stack alignment DR was using for 32-bit x86 Linux (for compatibility with legacy code). The SysV ABI breakage by gcc 4.5 was 10 years ago and in that time other compilers have followed suit, making 16-byte the de facto standard. Clang doesn't even support requesting 4-byte stack alignment. DR is now switching to the modern ABI of 16-byte stack alignment. Bumps the version to 7.92 and marks OLDEST_COMPATIBLE_VERSION as 791 to indicate the binary compatbility break for 32-bit x86 DR. Leaves Windows as 4-byte-aligned, since changing the injection assembly code and other pieces would be a bunch of extra work for little benefit: Windows 32-bit only requires 4-byte alignment, and the code is not that much more complex with a split alignment. Aligns the stack after clean call preparation (state saving) and again after clean call argument setup. Currently the stack restores can end up with two LEA's in a row; we leave removing that for future work. Adds stack alignment checks to some of the clean call tests. Updates the manual stack alignment in DR assembly code. I only found a few places to update and I expected to find more. We should monitor usage outside the test suite and look for problems. Issue: #847, #3966, #4200 Fixes: #3966 Fixes: #4200
Abandons the 4-byte stack alignment DR was using for 32-bit x86 Linux (for compatibility with legacy code). The SysV ABI breakage by gcc 4.5 was 10 years ago and in that time other compilers have followed suit, making 16-byte the de facto standard. Clang doesn't even support requesting 4-byte stack alignment. DR is now switching to the modern ABI of 16-byte stack alignment. Bumps the version to 7.92 and marks OLDEST_COMPATIBLE_VERSION as 791 to indicate the binary compatbility break for 32-bit x86 DR. The 32-bit Windows ABI only requires 4-byte alignment, so we leave DR as only ensuring 4-byte for Windows. There are potential issues with gcc or clang-compiled binaries on Windows but such binaries must already handle Windows system libraries. #4267 covers changing DR's alignment for such binaries. Updating the Windows code would require work in the various injection generated code sequences and other places. Aligns the stack after clean call preparation (state saving) and again after clean call argument setup. Currently the stack restores can end up with two LEA's in a row; we leave removing that for future work. Adds stack alignment checks to some of the clean call tests. Updates the manual stack alignment done in DR assembly code. I only found a few places to update and I expected to find more. We should monitor usage outside the test suite and look for problems. Issue: #847, #3966, #4200, #4267 Fixes: #3966 Fixes: #4200
platform
version
when run drrun with client , it could crash.
this is the backtrace of this bug
The text was updated successfully, but these errors were encountered: