-
Notifications
You must be signed in to change notification settings - Fork 565
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
"Illegal instruction" on armv8 android device #3761
Comments
Could you run with loglevel 3 and check the output, and - better - run in
gdb and check for the SIGILL's pc. Please note you might need to ignore the
first SIGILL you're getting, which is used in DynamoRIO internally.
Thanks
…On Tue, Jul 30, 2019 at 2:38 AM qwerty62 ***@***.***> wrote:
I've been running the samples from *DynamoRIO-ARM-Android-EABI-7.1.0-1*
on an *armv8 android* device. I built a simple HelloWorld binary
executable from 64-bit Ubuntu 16.04 using NDK, and pushed it onto the
android device. It ran normally without DynamoRIO or any client, showing:
*HelloWorld!*
but when I ran it under DynamoRIO by:
*./drrun -c ../sample/bin64/libbbsize.so -- ../hello*
it showed:
*Illegal instruction*
I tried using "-debug" flag:
*./drrun -debug -c ../sample/bin64/libbbsize.so -- ../hello*
and it showed:
*<Starting application /data/DynamoRIO/hello_v7 (31910)> <Initial options
= -no_dynamic_options -client_lib '/data/DynamoRIO/samples/bin3
2/libbbsize.so;0;' -code_api -stack_size 56K -signal_stack_size 32K
-max_elide_j mp 0 -max_elide_call 0 -early_inject -emulate_brk
-no_inline_ignored_syscalls -n ative_exec_default_list ''
-no_native_exec_managed_code -no_indcall2direct > <WARNING! symbol lookup
error: libc.so undefined symbol > Illegal instruction*
It would be great if anyone can offer some help.
Thanks.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3761?email_source=notifications&email_token=AKK7Q5NPSUPOZDMIG2LGRJLQCAD2FA5CNFSM4IH2MPD2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HCH7WFA>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKK7Q5KWDPD64TXNGUF2653QCAD2FANCNFSM4IH2MPDQ>
.
|
Android support is 32-bit only, and the package you cite DynamoRIO-ARM-Android-EABI-7.1.0-1 does not have a sample/bin64 directory. Please clarify what you are running. |
@derekbruening Sorry I mistook the directory. It was samples/bin32. And I believe ARM-V8 is compatible with 32-bit. |
Ran with -loglevel 3 and got the log with two .html files. But I cannot find anything valuable in the files. Could you please give some instructions on how to check the log files? @hgreving2304 |
While some systems and newer cores have the ability to run both ARM and
AArch64 binaries in different processes, the ISAs are entirely different
and not compatible. DynamoRIO has no ability to migrate between the two,
Android support is 32-bit only, see above. It still sounds like you might
be running an AArch64 binary, could you clarify?
…On Tue, Jul 30, 2019 at 7:40 PM qwerty62 ***@***.***> wrote:
Could you run with loglevel 3 and check the output, and - better - run in
gdb and check for the SIGILL's pc. Please note you might need to ignore the
first SIGILL you're getting, which is used in DynamoRIO internally. Thanks
… <#m_-4789562876007238151_>
On Tue, Jul 30, 2019 at 2:38 AM qwerty62 *@*.***> wrote: I've been
running the samples from *DynamoRIO-ARM-Android-EABI-7.1.0-1* on an *armv8
android* device. I built a simple HelloWorld binary executable from
64-bit Ubuntu 16.04 using NDK, and pushed it onto the android device. It
ran normally without DynamoRIO or any client, showing: *HelloWorld!* but
when I ran it under DynamoRIO by: *./drrun -c
../sample/bin64/libbbsize.so -- ../hello* it showed: *Illegal instruction*
I tried using "-debug" flag: *./drrun -debug -c
../sample/bin64/libbbsize.so -- ../hello* and it showed: *<Starting
application /data/DynamoRIO/hello_v7 (31910)> <Initial options =
-no_dynamic_options -client_lib '/data/DynamoRIO/samples/bin3
2/libbbsize.so;0;' -code_api -stack_size 56K -signal_stack_size 32K
-max_elide_j mp 0 -max_elide_call 0 -early_inject -emulate_brk
-no_inline_ignored_syscalls -n ative_exec_default_list ''
-no_native_exec_managed_code -no_indcall2direct > <WARNING! symbol lookup
error: libc.so undefined symbol > Illegal instruction* It would be great
if anyone can offer some help. Thanks. — You are receiving this because you
are subscribed to this thread. Reply to this email directly, view it on
GitHub <#3761 <#3761>?email_source=notifications&email_token=AKK7Q5NPSUPOZDMIG2LGRJLQCAD2FA5CNFSM4IH2MPD2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HCH7WFA>,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKK7Q5KWDPD64TXNGUF2653QCAD2FANCNFSM4IH2MPDQ
.
Ran with -loglevel 3 and got the log with two .html files. But I cannot
find anything valuable in the files. Could you please give some
instructions on how to check the log files? @hgreving2304
<https://github.com/hgreving2304>
Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3761?email_source=notifications&email_token=AKK7Q5OJXHG7UO3XTDFNSETQCD3SBA5CNFSM4IH2MPD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3F4I2I#issuecomment-516670569>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKK7Q5P7OOZL6FGJDXLEAUTQCD3SBANCNFSM4IH2MPDQ>
.
|
|
Are you able to run your 'hello' binary on the device w/o DynamoRIO? If
(and only if) yes, are you able to run this through a debugger and examine
the illegal instruction's address?
…On Thu, Aug 1, 2019 at 1:16 AM qwerty62 ***@***.***> wrote:
While some systems and newer cores have the ability to run both ARM and
AArch64 binaries in different processes, the ISAs are entirely different
and not compatible. DynamoRIO has no ability to migrate between the two,
Android support is 32-bit only, see above. It still sounds like you might
be running an AArch64 binary, could you clarify?
… <#m_8769967571994573323_>
On Tue, Jul 30, 2019 at 7:40 PM qwerty62 *@*.*> wrote: Could you run with
loglevel 3 and check the output, and - better - run in gdb and check for
the SIGILL's pc. Please note you might need to ignore the first SIGILL
you're getting, which is used in DynamoRIO internally. Thanks …
<#m_-4789562876007238151_> On Tue, Jul 30, 2019 at 2:38 AM qwerty62 @.*>
wrote: I've been running the samples from
*DynamoRIO-ARM-Android-EABI-7.1.0-1* on an *armv8 android* device. I
built a simple HelloWorld binary executable from 64-bit Ubuntu 16.04 using
NDK, and pushed it onto the android device. It ran normally without
DynamoRIO or any client, showing: *HelloWorld!* but when I ran it under
DynamoRIO by: *./drrun -c ../sample/bin64/libbbsize.so -- ../hello* it
showed: *Illegal instruction* I tried using "-debug" flag: *./drrun
-debug -c ../sample/bin64/libbbsize.so -- ../hello* and it showed: *<Starting
application /data/DynamoRIO/hello_v7 (31910)> <Initial options =
-no_dynamic_options -client_lib '/data/DynamoRIO/samples/bin3
2/libbbsize.so;0;' -code_api -stack_size 56K -signal_stack_size 32K
-max_elide_j mp 0 -max_elide_call 0 -early_inject -emulate_brk
-no_inline_ignored_syscalls -n ative_exec_default_list ''
-no_native_exec_managed_code -no_indcall2direct > <WARNING! symbol lookup
error: libc.so undefined symbol > Illegal instruction* It would be great
if anyone can offer some help. Thanks. — You are receiving this because you
are subscribed to this thread. Reply to this email directly, view it on
GitHub <#3761 <#3761> <#3761
<#3761>>?email_source=notifications&email_token=AKK7Q5NPSUPOZDMIG2LGRJLQCAD2FA5CNFSM4IH2MPD2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HCH7WFA>,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKK7Q5KWDPD64TXNGUF2653QCAD2FANCNFSM4IH2MPDQ
. Ran with -loglevel 3 and got the log with two .html files. But I cannot
find anything valuable in the files. Could you please give some
instructions on how to check the log files? @hgreving2304
<https://github.com/hgreving2304> https://github.com/hgreving2304 Thanks.
— You are receiving this because you were mentioned. Reply to this email
directly, view it on GitHub <#3761
<#3761>?email_source=notifications&email_token=AKK7Q5OJXHG7UO3XTDFNSETQCD3SBA5CNFSM4IH2MPD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3F4I2I#issuecomment-516670569>,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKK7Q5P7OOZL6FGJDXLEAUTQCD3SBANCNFSM4IH2MPDQ
.
[image: snapshot]
<https://user-images.githubusercontent.com/39083426/62276887-9414a680-b477-11e9-8286-c31e12ef83f9.PNG>
As you can see from above, the binary I'm running is a 32-bit binary,
should be able to run on DynamoRIO I guess.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3761?email_source=notifications&email_token=AKK7Q5MDIM4X5WTR2SWP2FDQCKLXLA5CNFSM4IH2MPD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3JX7KQ#issuecomment-517177258>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKK7Q5IYXKETU5INPRE5Q2TQCKLXLANCNFSM4IH2MPDQ>
.
|
Solved the problem by adding set(DynamoRIO_USE_LIBC OFF) to the CMakelist.txt. |
Linking the client to libc should not result in invalid code and an illegal instruction. |
Agreed, it sounds like there is some problem with the private loading of Bionic. Probably this is a duplicate of #3543 on Android 9+. There is a workaround patch in that issue. Marking it as a duplicate. |
I've been running the samples from DynamoRIO-ARM-Android-EABI-7.1.0-1 on an armv8 android device. I built a simple HelloWorld binary executable from 64-bit Ubuntu 16.04 using Android-NDK, and pushed it onto the android device. It ran normally without DynamoRIO or any client, showing:
HelloWorld!
but when I ran it under DynamoRIO by:
./drrun -c ../samples/bin32/libbbsize.so -- ../hello
it showed:
Illegal instruction
I tried using "-debug" flag:
./drrun -debug -c ../samples/bin32/libbbsize.so -- ../hello
and it showed:
<Starting application /data/DynamoRIO/hello (31910)>
<Initial options = -no_dynamic_options -client_lib '/data/DynamoRIO/samples/bin3
2/libbbsize.so;0;' -code_api -stack_size 56K -signal_stack_size 32K -max_elide_j
mp 0 -max_elide_call 0 -early_inject -emulate_brk -no_inline_ignored_syscalls -n
ative_exec_default_list '' -no_native_exec_managed_code -no_indcall2direct >
<WARNING! symbol lookup error: libc.so undefined symbol >
Illegal instruction
It would be great if anyone can offer some help.
Thanks.
The text was updated successfully, but these errors were encountered: