If sqlite is the evil, you should be able to reproduce it by writing a
pure C program that calls the same function and dynamically linked to
/system/lib/libsqlite.so when loading. Just several lines can confirm
this.

And, well, here is my question: after inquired Google and Baidu and
several other ones I still have no idea how to clone an Android source
code repository on dev.lemote.com via the Git interface. Could someone
please point me a tutorial/example in detail or just do this for me?
Thanks.......

在 2012年1月12日 上午12:38,李晖 <lihui205...@gmail.com> 写道:
> hi, all
>    by further debuging, I found this problem was cased by calling
> sqlite3_open_v2(path8, &handle, sqliteFlags, NULL) function in dbopen
> of frameworks\base\core\jni\android_database_SQLiteDatabase.cpp file,
> it not crash directly in the sqlite3_open_v2 function, but died some
> where
> after calling sqlite3_open_v2, if I replaced the sqlite3_open_v2
> function with the following code:
> for(int i=0;i<10000000;i++)
>    LOGI("useless code");
>
> process will not die in the for loop at least, so I think the
> sqlite3_open_v2 function is the evil, but I do not know what to do
> next!
>
> BTW, the linux kernel is 64bit and android filesystem is 32bit, did it
> affect?
>
> On 1月11日, 上午12时33分, 李晖 <lihui205...@gmail.com> wrote:
>> hi, all
>>     I am porting android to loongson2f, when the System Server bring up the
>> Account Manager
>>
>> Service, the System Service process was terminated by signal 11, by adding
>> log to the source code,
>>
>> I found it died in the JNI C code, following is the calling stack:
>>
>> > ServerThread:run
>> >     PowerManagerService()
>> >         validateAccounts()
>> >             DatabaseHelper::getWritableDatabase()
>> >                 SQLiteOpenHelper::getWritableDatabase()
>> >                     ContextImpl::openOrCreateDatabase()
>> >                         SQLiteDatabase.openOrCreateDatabase()
>> >                             SQLiteDatabase.openDatabase()
>> >                                 SQLiteDatabase()  //Constructor
>> >                                     dbopen()    //JNI C code implemented
>> > in "frameworks\base\core\jni\android_database_SQLiteDatabase.cpp
>>
>> I am sure the System Service died in the dbopen code as I called the Log.i
>> function millions time
>>
>> before the dbopen, log are all printed correctly, and I also added the
>> following the code at the
>>
>> end of dbopen function:
>>
>> > for(int i=0; i<1000; i++)
>> > {
>> > fprintf(fp, "dbopen %d\n", i);
>> > fflush(fp);
>> > }
>>
>> not all logs are recored, if I removes the for loop at the end of dbopen
>> function, the system will die some statement after the dbopen call, so, I
>> think the system died in this function, but I don't known how to fix it,
>> did it have to do with the JNI system?
>>
>> any suggestion or tips will be appreciated!
>> thanks!
>>
>> Best Regards
>> -------------------------------------------------------------------
>> -------------------------------------------------------------------
>> 北京航空航天大学大学嵌入式系统实验室
>> 新主楼G座1028室
>> 李晖
>> MSN:lihui205...@163.com
>
> --
> You received this message because you are subscribed to the Google Groups 
> "loongson-dev" group.
> To post to this group, send email to loongson-dev@googlegroups.com.
> To unsubscribe from this group, send email to 
> loongson-dev+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/loongson-dev?hl=en.
>



-- 
https://fedoraproject.org/wiki/User:Lonestar

-- 
You received this message because you are subscribed to the Google Groups 
"loongson-dev" group.
To post to this group, send email to loongson-dev@googlegroups.com.
To unsubscribe from this group, send email to 
loongson-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/loongson-dev?hl=en.

Reply via email to