SIGBUS与SIGSEGV详解:http://blog.csdn.net/skdkjzz/article/details/50629330
对切换到ART模式后的启动日志进行分析,发现如下错误:
ERROR 1 : Fatal signal 10 (SIGBUS) at 0x00000000 (code=128), thread 115 (main)
……
backtrace:
#00 pc 0005d4fc /system/lib/libart.so
#01 pc 0016a03c /system/lib/libart.so (art::interpreter::EnterInterpreterFromInvoke(art::Thread*, art::mirror::ArtMethod*, art::mirror::Object*,unsigned int*, art::JValue*)+996)
查资料后初步确定为内存地址对齐问题,使用 Ctags 对ART源码跟踪调试,函数调用路径如下:
在文件art/runtime/interpreter/interpreter.cc中,
void EnterInterpreterFromInvoke(...) --> static inline JValue Execute(...) --> static JValue ExecuteImpl<false>(...)
函数ExecuteImpl(...)内的switch (inst->Opcode())语句的分支case Instruction::DIV_DOUBLE_2ADDR: 中ÿ