songhongji / androguard

Automatically exported from code.google.com/p/androguard
Apache License 2.0
1 stars 0 forks source link

Clicking on XML asset in APK causes spin and massive memory allocation #106

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Clicking on a certain XML asset in an APK causes TextMate to spin, and allocate 
massive amounts of memory (~1G every 2 seconds).  The XML asset is nothing 
special, only 42579b, and can be accessed just fine in Sublime Text manually by 
unzipping the APK.

Here is the worthless python backtrace from a sample:

Call graph:
    7810 Thread_7514607   DispatchQueue_1: com.apple.main-thread  (serial)
    + 7810 start  (in Sublime Text 2) + 52  [0x10fadc064]
    +   7810 main  (in Sublime Text 2) + 2251  [0x10fbcd3cb]
    +     7810 -[NSApplication run]  (in AppKit) + 636  [0x7fff905452fa]
    +       7810 -[NSApplication sendEvent:]  (in AppKit) + 5761  [0x7fff9062f744]
    +         7810 ???  (in Sublime Text 2)  load address 0x10fada000 + 0x25d919  [0x10fd37919]
    +           7810 window_impl::handle_event(px_event_t*)  (in Sublime Text 2) + 671  [0x10fb4e9a3]
    +             7810 route_message_using_position(ui_message_type, void*, control*, point)  (in Sublime Text 2) + 174  [0x10fafe7ae]
    +               7810 message_handler::handle_message(ui_message_type, void*)  (in Sublime Text 2) + 652  [0x10fb1d6f4]
    +                 7810 python_command::run(value const&)  (in Sublime Text 2) + 131  [0x10fc1bb2d]
    +                   7810 PyEval_CallFunction  (in Python) + 183  [0x1104c680a]
    +                     7810 PyEval_CallObjectWithKeywords  (in Python) + 177  [0x11049ddfc]
    +                       7810 PyObject_Call  (in Python) + 97  [0x110496aba]
    +                         7810 ???  (in Python)  load address 0x110483000 + 0x2e19a  [0x1104b119a]
    +                           7810 PyObject_Call  (in Python) + 97  [0x110496aba]
    +                             7810 ???  (in Python)  load address 0x110483000 + 0x54f78  [0x1104d7f78]
    +                               7810 PyEval_EvalCodeEx  (in Python) + 1956  [0x110498281]
    +                                 7810 PyEval_EvalFrameEx  (in Python) + 2452  [0x110498c59]
    +                                   7810 PyObject_Call  (in Python) + 97  [0x110496aba]
    +                                     7810 ???  (in Python)  load address 0x110483000 + 0x54f78  [0x1104d7f78]
    +                                       7810 PyEval_EvalCodeEx  (in Python) + 1956  [0x110498281]
    +                                         7810 PyEval_EvalFrameEx  (in Python) + 7693  [0x11049a0d2]
    +                                           7810 ???  (in Python)  load address 0x110483000 + 0x1b5eb  [0x11049e5eb]
    +                                             7810 PyEval_EvalFrameEx  (in Python) + 8032  [0x11049a225]
    +                                               7810 PyObject_Call  (in Python) + 97  [0x110496aba]
    +                                                 7810 PyInstance_New  (in Python) + 276  [0x1104af23e]
    +                                                   7810 PyEval_CallObjectWithKeywords  (in Python) + 177  [0x11049ddfc]
    +                                                     7810 PyObject_Call  (in Python) + 97  [0x110496aba]
    +                                                       7810 ???  (in Python)  load address 0x110483000 + 0x2e19a  [0x1104b119a]
    +                                                         7810 PyObject_Call  (in Python) + 97  [0x110496aba]
    +                                                           7810 ???  (in Python)  load address 0x110483000 + 0x54f78  [0x1104d7f78]
    +                                                             7810 PyEval_EvalCodeEx  (in Python) + 1956  [0x110498281]
    +                                                               7810 PyEval_EvalFrameEx  (in Python) + 8032  [0x11049a225]
    +                                                                 7810 PyObject_Call  (in Python) + 97  [0x110496aba]
    +                                                                   7810 PyInstance_New  (in Python) + 276  [0x1104af23e]
    +                                                                     7810 PyEval_CallObjectWithKeywords  (in Python) + 177  [0x11049ddfc]
    +                                                                       7810 PyObject_Call  (in Python) + 97  [0x110496aba]
    +                                                                         7810 ???  (in Python)  load address 0x110483000 + 0x2e19a  [0x1104b119a]
    +                                                                           7810 PyObject_Call  (in Python) + 97  [0x110496aba]
    +                                                                             7810 ???  (in Python)  load address 0x110483000 + 0x54f78  [0x1104d7f78]
    +                                                                               7810 PyEval_EvalCodeEx  (in Python) + 1956  [0x110498281]
    +                                                                                 7810 PyEval_EvalFrameEx  (in Python) + 8032  [0x11049a225]
    +                                                                                   7810 PyObject_Call  (in Python) + 97  [0x110496aba]
    +                                                                                     7810 PyInstance_New  (in Python) + 276  [0x1104af23e]
    +                                                                                       7810 PyEval_CallObjectWithKeywords  (in Python) + 177  [0x11049ddfc]
    +                                                                                         7810 PyObject_Call  (in Python) + 97  [0x110496aba]
    +                                                                                           7810 ???  (in Python)  load address 0x110483000 + 0x2e19a  [0x1104b119a]
    +                                                                                             7810 PyObject_Call  (in Python) + 97  [0x110496aba]
    +                                                                                               7810 ???  (in Python)  load address 0x110483000 + 0x54f78  [0x1104d7f78]
    +                                                                                                 7810 PyEval_EvalCodeEx  (in Python) + 1956  [0x110498281]
    +                                                                                                   7810 PyEval_EvalFrameEx  (in Python) + 7548  [0x11049a041]
    +                                                                                                     6045 ???  (in Python)  load address 0x110483000 + 0xac85  [0x11048dc85]
    +                                                                                                     1563 ???  (in Python)  load address 0x110483000 + 0xac7c  [0x11048dc7c]
    +                                                                                                     ! 1348 PyInt_FromLong  (in Python) + 55  [0x1104da83f]
    +                                                                                                     ! : 910 ???  (in Python)  load address 0x110483000 + 0x578c3  [0x1104da8c3]
    +                                                                                                     ! : 227 ???  (in Python)  load address 0x110483000 + 0x57889  [0x1104da889]
    +                                                                                                     ! : | 200 malloc  (in libsystem_c.dylib) + 41  [0x7fff940b3ba7]
    +                                                                                                     ! : | + 187 malloc_zone_malloc  (in libsystem_c.dylib) + 71  [0x7fff940b3153]
    +                                                                                                     ! : | + ! 57 szone_malloc_should_clear  (in libsystem_c.dylib) + 971  [0x7fff940c0ad8]
    +                                                                                                     ! : | + ! : 57 tiny_malloc_from_free_list  (in libsystem_c.dylib) + 1015,1008,...  [0x7fff940c050f,0x7fff940c0508,...]
    +                                                                                                     ! : | + ! 52 szone_malloc_should_clear  (in libsystem_c.dylib) + 1289,4126,...  [0x7fff940c0c16,0x7fff940c172b,...]
    +                                                                                                     ! : | + ! 32 szone_malloc_should_clear  (in libsystem_c.dylib) + 1163  [0x7fff940c0b98]
    +                                                                                                     ! : | + ! : 28 allocate_pages_securely  (in libsystem_c.dylib) + 197  [0x7fff940c1d39]
    +                                                                                                     ! : | + ! : | 28 __mmap  (in libsystem_kernel.dylib) + 10  [0x7fff8a79bf3a]
    +                                                                                                     ! : | + ! : 4 allocate_pages_securely  (in libsystem_c.dylib) + 404  [0x7fff940c1e08]
    +                                                                                                     ! : | + ! :   4 __munmap  (in libsystem_kernel.dylib) + 10  [0x7fff8a79bfc6]
    +                                                                                                     ! : | + ! 22 szone_malloc_should_clear  (in libsystem_c.dylib) + 195  [0x7fff940c07d0]
    +                                                                                                     ! : | + ! : 22 _spin_lock$VARIANT$mp  (in libsystem_c.dylib) + 0,13,...  [0x7fff94088f30,0x7fff94088f3d,...]
    +                                                                                                     ! : | + ! 13 szone_malloc_should_clear  (in libsystem_c.dylib) + 136  [0x7fff940c0795]
    +                                                                                                     ! : | + ! : 13 cpu_number  (in libsystem_c.dylib) + 1,12,...  [0x7fff94086ca4,0x7fff94086caf,...]
    +                                                                                                     ! : | + ! 5 szone_malloc  (in libsystem_c.dylib) + 1,0  [0x7fff940b565f,0x7fff940b565e]
    +                                                                                                     ! : | + ! 4 szone_malloc_should_clear  (in libsystem_c.dylib) + 1003  [0x7fff940c0af8]
    +                                                                                                     ! : | + ! : 4 OSSpinLockUnlock  (in libsystem_c.dylib) + 6,0  [0x7fff94088f6e,0x7fff94088f68]
    +                                                                                                     ! : | + ! 1 DYLD-STUB$$_spin_lock  (in libsystem_c.dylib) + 0  [0x7fff94129c98]
    +                                                                                                     ! : | + ! 1 szone_malloc_should_clear  (in libsystem_c.dylib) + 1140  [0x7fff940c0b81]
    +                                                                                                     ! : | + !   1 OSSpinLockUnlock  (in libsystem_c.dylib) + 0  [0x7fff94088f68]
    +                                                                                                     ! : | + 13 malloc_zone_malloc  (in libsystem_c.dylib) + 0,67,...  [0x7fff940b310c,0x7fff940b314f,...]
    +                                                                                                     ! : | 27 malloc  (in libsystem_c.dylib) + 33,0,...  [0x7fff940b3b9f,0x7fff940b3b7e,...]
    +                                                                                                     ! : 153 ???  (in Python)  load address 0x110483000 + 0x578c7  [0x1104da8c7]
    +                                                                                                     ! : 23 ???  (in Python)  load address 0x110483000 + 0x5789f  [0x1104da89f]
    +                                                                                                     ! : 12 ???  (in Python)  load address 0x110483000 + 0x578d8  [0x1104da8d8]
    +                                                                                                     ! : 5 ???  (in Python)  load address 0x110483000 + 0x578d0  [0x1104da8d0]
    +                                                                                                     ! : 4 ???  (in Python)  load address 0x110483000 + 0x5787c  [0x1104da87c]
    +                                                                                                     ! : 3 ???  (in Python)  load address 0x110483000 + 0x5787b  [0x1104da87b]
    +                                                                                                     ! : 3 ???  (in Python)  load address 0x110483000 + 0x57889  [0x1104da889]
    +                                                                                                     ! : 2 ???  (in Python)  load address 0x110483000 + 0x578a2  [0x1104da8a2]
    +                                                                                                     ! : 1 ???  (in Python)  load address 0x110483000 + 0x57898  [0x1104da898]
    +                                                                                                     ! : 1 ???  (in Python)  load address 0x110483000 + 0x578a9  [0x1104da8a9]
    +                                                                                                     ! : 1 ???  (in Python)  load address 0x110483000 + 0x578bf  [0x1104da8bf]
    +                                                                                                     ! : 1 ???  (in Python)  load address 0x110483000 + 0x578cb  [0x1104da8cb]
    +                                                                                                     ! : 1 ???  (in Python)  load address 0x110483000 + 0x578dc  [0x1104da8dc]
    +                                                                                                     ! : 1 DYLD-STUB$$malloc  (in Python) + 0  [0x11053ee80]
    +                                                                                                     ! 215 PyInt_FromLong  (in Python) + 91,69,...  [0x1104da863,0x1104da84d,...]
    +                                                                                                     125 ???  (in Python)  load address 0x110483000 + 0xac89  [0x11048dc89]
    +                                                                                                     26 ???  (in Python)  load address 0x110483000 + 0xac91  [0x11048dc91]
    +                                                                                                     19 ???  (in Python)  load address 0x110483000 + 0xac77  [0x11048dc77]
    +                                                                                                     11 ???  (in Python)  load address 0x110483000 + 0xac94  [0x11048dc94]
    +                                                                                                     8 ???  (in Python)  load address 0x110483000 + 0xac7c  [0x11048dc7c]
    +                                                                                                     8 ???  (in Python)  load address 0x110483000 + 0xac8d  [0x11048dc8d]
    +                                                                                                     4 ???  (in Python)  load address 0x110483000 + 0xac81  [0x11048dc81]
    +                                                                                                     1 ???  (in Python)  load address 0x110483000 + 0xac7f  [0x11048dc7f]

Original issue reported on code.google.com by drspring...@gmail.com on 18 Jan 2013 at 3:55

GoogleCodeExporter commented 8 years ago
Can you provide the XML ?

Original comment by anthony....@gmail.com on 18 Jan 2013 at 3:57

GoogleCodeExporter commented 8 years ago

Original comment by drspring...@gmail.com on 18 Jan 2013 at 3:59

Attachments:

GoogleCodeExporter commented 8 years ago
Have you the APK too ?

Original comment by anthony....@gmail.com on 19 Jan 2013 at 10:01