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

APP CRASH Any X11 Appilcation using Debug DynamoRIO Build #231

Closed
derekbruening opened this issue Nov 27, 2014 · 1 comment
Closed

APP CRASH Any X11 Appilcation using Debug DynamoRIO Build #231

derekbruening opened this issue Nov 27, 2014 · 1 comment

Comments

@derekbruening
Copy link
Contributor

From peterfeiner on November 23, 2009 18:12:38

As far as I can tell, running X11 applications under DynamoRIO in debugging
mode isn't a known limitation. I do not observe the application crash per
se, however the output is different from what's expected: the application
fails to start. What steps will reproduce the problem? 1. Build DynamoRIO with debugging enabled (I used r242 ) or download the
release (I used http://dynamorio.googlecode.com/files/DynamoRIO-Linux-1.4.0-20.tar.gz ).
2. Run any X11 application, for example:

~/DynamoRIO-Linux-1.4.0-20/bin32/drdeploy -debug $(which xcalc)

or

~/dynamorio-read-only/exports-gcc4.3-debug/bin32/drdeploy -debug $(which xcalc)

where the latter was checked out from SVN. What is the expected output? What do you see instead? X11 application should start up. Instead, I see

<Starting application xcalc (23361)>
XIO: fatal IO error 0 (Success) on X server ":0.0"
after 4 requests (0 known processed) with 0 events remaining.
<Stopping application xcalc (23361)>

I tried this with numerous X11 applications: xcalc, xeyes, and firefox. What version of the product are you using? On what operating system? I tried the release build (1.4.0-20) and the head of the SVN repository
(currently r242 ) on the 32-bit variants of Ubuntu Linux 9.10 and 8.10. For
the version of DynamoRIO I built myself, I observed the problem with gcc
3.4 and gcc 4.3. Please provide any additional information below. The X11 applications start without problems using release builds of DynamoRIO.

Original issue: http://code.google.com/p/dynamorio/issues/detail?id=231

@derekbruening
Copy link
Contributor Author

From [email protected] on January 12, 2010 14:37:16

this was fixed in r251 xref issue #238

Status: Fixed

derekbruening added a commit that referenced this issue Jul 5, 2023
8 of the 13 tests on Mac AArch64 labeled "OSX" fail prior to this PR.
Here we fix the following:

+ Syscall success is indicated by the carry flag just like x86 Mac
+ Handle sigreturn with its extra parameters just like x86 Mac
+ Fix signal handler parameters
+ Fix stolen register support in signal contexts
+ Use MAP_JIT and pthread_jit_write_protect_np for +rwx gencode in tests
+ Use DYLD_LIBRARY_PATH on Mac in tests

Now all 13 tests pass:
---------------------------------------------------------------------------------------
ctest -j 5 -L OSX
 1/13 Test  #13: code_api|common.fib ................................  Passed  0.59 sec
 2/13 Test #243: code_api|libutil.frontend_test .....................  Passed  0.63 sec
 3/13 Test #231: code_api|api.ir ....................................  Passed  0.67 sec
 4/13 Test   #9: code_api|linux.sigaction.native ....................  Passed  0.25 sec
 5/13 Test  #31: code_api|linux.signal0000 ..........................  Passed  0.10 sec
 6/13 Test #240: code_api|api.ir-static .............................  Passed  0.34 sec
 7/13 Test #241: code_api|api.drdecode ..............................  Passed  0.38 sec
 8/13 Test #245: code_api|api.dis-a64 ...............................  Passed  1.15 sec
 9/13 Test #264: no_code_api,no_intercept_all_signals|linux.sigaction  Passed  0.08 sec
10/13 Test  #33: code_api|linux.signal0010 ..........................  Passed  0.34 sec
11/13 Test  #35: code_api|linux.signal0100 ..........................  Passed  0.42 sec
12/13 Test  #37: code_api|linux.signal0110 ..........................  Passed  0.45 sec
13/13 Test   #7: samples_proj .......................................  Passed  1.89 sec
100% tests passed, 0 tests failed out of 13
---------------------------------------------------------------------------------------

Issue: #5383
github-merge-queue bot pushed a commit that referenced this issue Jul 7, 2023
8 of the 13 tests on Mac AArch64 labeled "OSX" fail prior to this PR.
Here we fix the following:

+ Syscall success is indicated by the carry flag just like x86 Mac
+ Handle sigreturn with its extra parameters just like x86 Mac
+ Fix signal handler parameters
+ Fix stolen register support in signal contexts
+ Use MAP_JIT and pthread_jit_write_protect_np for +rwx gencode in tests
+ Use DYLD_LIBRARY_PATH on Mac in tests

Now all 13 tests pass:
```
---------------------------------------------------------------------------------------
$ ctest -j 5 -L OSX
 1/13 Test  #13: code_api|common.fib ................................  Passed  0.59 sec
 2/13 Test #243: code_api|libutil.frontend_test .....................  Passed  0.63 sec
 3/13 Test #231: code_api|api.ir ....................................  Passed  0.67 sec
 4/13 Test   #9: code_api|linux.sigaction.native ....................  Passed  0.25 sec
 5/13 Test  #31: code_api|linux.signal0000 ..........................  Passed  0.10 sec
 6/13 Test #240: code_api|api.ir-static .............................  Passed  0.34 sec
 7/13 Test #241: code_api|api.drdecode ..............................  Passed  0.38 sec
 8/13 Test #245: code_api|api.dis-a64 ...............................  Passed  1.15 sec
 9/13 Test #264: no_code_api,no_intercept_all_signals|linux.sigaction  Passed  0.08 sec
10/13 Test  #33: code_api|linux.signal0010 ..........................  Passed  0.34 sec
11/13 Test  #35: code_api|linux.signal0100 ..........................  Passed  0.42 sec
12/13 Test  #37: code_api|linux.signal0110 ..........................  Passed  0.45 sec
13/13 Test   #7: samples_proj .......................................  Passed  1.89 sec
100% tests passed, 0 tests failed out of 13
---------------------------------------------------------------------------------------
```
Issue: #5383
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant