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

compact_dex_converter crashing when verifying some framework converted files #31

Open
anestisb opened this issue Sep 8, 2018 · 1 comment
Assignees
Labels

Comments

@anestisb
Copy link
Owner

anestisb commented Sep 8, 2018

$ gdb /tmp/vdexExtractor/tools/deodex/hostTools/Linux/api-API_28/bin/compact_dex_converter
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /tmp/vdexExtractor/tools/deodex/hostTools/Linux/api-API_28/bin/compact_dex_converter...done.
(gdb) run -v -w . old/vdexExtractor_decompiled/boot-core-oj/decompiled/boot-core-oj_classes.cdex
Starting program: /tmp/vdexExtractor/tools/deodex/hostTools/Linux/api-API_28/bin/compact_dex_converter -v -w . old/vdexExtractor_decompiled/boot-core-oj/decompiled/boot-core-oj_classes.cdex
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Opened 'old/vdexExtractor_decompiled/boot-core-oj/decompiled/boot-core-oj_classes.cdex', DEX version '001'
compact_dex_converter W 09-08 12:27:03 19161 19161 dex_file_verifier.cc:377] Ignoring bad checksum (c6c4c142, expected be17fbb4)
compact_dex_converter F 09-08 12:27:03 19161 19161 dexlayout.cc:1950] Check failed: output_dex_file != nullptr Failed to re-open output file:Failure to verify dex file 'memory mapped file for old/vdexExtractor_decompiled/boot-core-oj/decompiled/boot-core-oj_classes.cdex': Method may have only one of public/protected/private, Ljava/lang/Object;.identityHashCode: f

Program received signal SIGSEGV, Segmentation fault.
art::Mutex::ExclusiveLock (this=0x0, self=0x0) at art/runtime/base/mutex.cc:435
435	art/runtime/base/mutex.cc: No such file or directory.
(gdb) bt
#0  art::Mutex::ExclusiveLock (this=0x0, self=0x0) at art/runtime/base/mutex.cc:435
#1  0x00007ffff7bf98ef in art::MutexLock::MutexLock (self=0x0, mu=..., this=<optimized out>) at art/runtime/base/mutex.h:513
#2  art::Runtime::Abort (
    msg=0x55555555d9e0 "Check failed: output_dex_file != nullptr Failed to re-open output file:Failure to verify dex file 'memory mapped file for old/vdexExtractor_decompiled/boot-core-oj/decompiled/boot-core-oj_classes.cdex"...) at art/runtime/runtime.cc:545
#3  0x00007ffff7fee720 in std::__1::function<void (char const*)>::operator()(char const*) const (this=<optimized out>,
    __arg=0x55555555d9e0 "Check failed: output_dex_file != nullptr Failed to re-open output file:Failure to verify dex file 'memory mapped file for old/vdexExtractor_decompiled/boot-core-oj/decompiled/boot-core-oj_classes.cdex"...) at external/libcxx/include/functional:1916
#4  android::base::LogMessage::~LogMessage (this=0x7fffffffd810) at system/core/base/logging.cpp:458
#5  0x00007ffff7fb6a58 in art::DexLayout::ProcessDexFile (this=0x7fffffffda80, file_name=0x7ffff5005010 "dex\n039", dex_file=0x55555555d810,
    dex_file_index=<optimized out>, dex_container=<optimized out>, error_msg=<optimized out>) at art/dexlayout/dexlayout.cc:1950
#6  0x0000555555556f54 in art::ProcessFile (file_name=0x7fffffffdfa4 "old/vdexExtractor_decompiled/boot-core-oj/decompiled/boot-core-oj_classes.cdex",
    out_file=<optimized out>, output_dex_directory=<optimized out>, verify_output_file=<optimized out>) at art/dexlayout/compact_dex_converter_main.cc:111
#7  art::DexlayoutDriver (argc=5, argv=<optimized out>) at art/dexlayout/compact_dex_converter_main.cc:235
#8  0x0000555555557ead in main (argc=5, argv=0x7fffffffdc98) at art/dexlayout/compact_dex_converter_main.cc:252
@anestisb anestisb added the bug label Sep 8, 2018
@anestisb anestisb self-assigned this Sep 8, 2018
@anestisb
Copy link
Owner Author

anestisb commented Sep 8, 2018

Issue appears to be reproducible only when using the optional verify flag (-v). Thus not a priority at the moment. However, will be soon fixed since the verifier is useful to track issues when converting CompactDex files. Until resolved, the verifier of the dexdump2 ART utility can be used against the output converted file.

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

1 participant