-
-
未解决 [求助]frida引用枚举值,导致global reference table overflow (max=51200)
-
发表于: 2020-12-31 12:00 2483
-
最近在用FRIDA修改安卓的的网络状态后,手机运行几个小时就出现异常,检测日志发现是JAVA的全局应用超过大小导致的,日志里出现 global reference table overflow (max=51200) ,请问要如何赋值,才能及时释放引用呢。代码是这样的:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | Java.perform(function () { var networkInfo = Java.use( "android.net.NetworkInfo" ); var netmanager = Java.use( "com.android.server.ConnectivityService" ); netmanager.getActiveNetworkInfo.implementation = function () { var netInfo = networkInfo.$new( 1 , 0 , "WIFI" , "subWifi" ); / / var netState = Java.use( "android.net.NetworkInfo$State" ); var netDetailedState = Java.use( "android.net.NetworkInfo$DetailedState" ); netInfo.mIsAvailable.value = true; netInfo.setDetailedState(netDetailedState.CONNECTED.value,null,null); / / netInfo.mState.value = netState.CONNECTED.value; / / netInfo.mDetailedState.value = netDetailedState.CONNECTED.value; / / console.log( "getActiveNetworkInfo2 " + netInfo.toString()); return netInfo; }; |
打印的日志如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 12 - 31 03 : 26 : 44.292 25573 26775 F art : art / runtime / indirect_reference_table.cc: 116 ] JNI ERROR (app bug): global reference table overflow ( max = 51200 ) 12 - 31 03 : 26 : 44.292 25573 26775 F art : art / runtime / indirect_reference_table.cc: 116 ] global reference table dump: 12 - 31 03 : 26 : 44.292 25573 26775 F art : art / runtime / indirect_reference_table.cc: 116 ] Last 10 entries (of 51199 ): 12 - 31 03 : 26 : 44.292 25573 26775 F art : art / runtime / indirect_reference_table.cc: 116 ] 51198 : 0x70e45128 android.net.NetworkInfo$DetailedState 12 - 31 03 : 26 : 44.292 25573 26775 F art : art / runtime / indirect_reference_table.cc: 116 ] 51197 : 0x70e45128 android.net.NetworkInfo$DetailedState 12 - 31 03 : 26 : 44.292 25573 26775 F art : art / runtime / indirect_reference_table.cc: 116 ] 51196 : 0x70e45128 android.net.NetworkInfo$DetailedState 12 - 31 03 : 26 : 44.292 25573 26775 F art : art / runtime / indirect_reference_table.cc: 116 ] 51195 : 0x70e45128 android.net.NetworkInfo$DetailedState 12 - 31 03 : 26 : 44.292 25573 26775 F art : art / runtime / indirect_reference_table.cc: 116 ] 51194 : 0x70e45128 android.net.NetworkInfo$DetailedState 12 - 31 03 : 26 : 44.292 25573 26775 F art : art / runtime / indirect_reference_table.cc: 116 ] 51193 : 0x70e45128 android.net.NetworkInfo$DetailedState 12 - 31 03 : 26 : 44.292 25573 26775 F art : art / runtime / indirect_reference_table.cc: 116 ] 51192 : 0x70e45128 android.net.NetworkInfo$DetailedState 12 - 31 03 : 26 : 44.292 25573 26775 F art : art / runtime / indirect_reference_table.cc: 116 ] 51191 : 0x70e45128 android.net.NetworkInfo$DetailedState 12 - 31 03 : 26 : 44.292 25573 26775 F art : art / runtime / indirect_reference_table.cc: 116 ] 51190 : 0x70e45128 android.net.NetworkInfo$DetailedState 12 - 31 03 : 26 : 44.292 25573 26775 F art : art / runtime / indirect_reference_table.cc: 116 ] 51189 : 0x70e45128 android.net.NetworkInfo$DetailedState 12 - 31 03 : 26 : 44.292 25573 26775 F art : art / runtime / indirect_reference_table.cc: 116 ] Summary: 12 - 31 03 : 26 : 44.292 25573 26775 F art : art / runtime / indirect_reference_table.cc: 116 ] 1 of com.android.server.power.PowerManagerService |
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)
赞赏
看原图
赞赏
雪币:
留言: