我试图在android上使用valgrind运行应用程序,但是我收到错误VG_(mkstemp):无法创建临时文件。我读到这个问题经常发生在android上,但我没有找到任何解决方案。我在this post上做了所有事情,在第二个脚本中有一点不同,我使用批处理而非bash。
08-28 12:13:53.820: I/dalvikvm(19303): Exec: /system/bin/sh -c logwrapper sh /data/local/hellojni_valgrind.sh /system/bin/app_process /system/bin --application '--nice-name=com.example.hellojni' com.android.internal.os.WrapperInit 28 3 'android.app.ActivityThread' 08-28 12:13:53.850: I/sh(19312): ==19315== VG_(mkstemp): failed to create temp file: /data/data/com.example.hellojni 08-28 12:13:53.850: I/sh(19312): ==19315== VG_(mkstemp): failed to create temp file: /data/data/com.example.hellojni 08-28 12:13:53.850: I/sh(19312): ==19315== VG_(mkstemp): failed to create temp file: /data/data/com.example.hellojni 08-28 12:13:53.850: I/sh(19312): ==19315== VG_(mkstemp): failed to create temp file: /data/data/com.example.hellojni 08-28 12:13:53.850: I/sh(19312): ==19315== VG_(mkstemp): failed to create temp file: /data/data/com.example.hellojni 08-28 12:13:53.850: I/sh(19312): ==19315== VG_(mkstemp): failed to create temp file: /data/data/com.example.hellojni 08-28 12:13:53.850: I/sh(19312): ==19315== VG_(mkstemp): failed to create temp file: /data/data/com.example.hellojni 08-28 12:13:53.850: I/sh(19312): ==19315== VG_(mkstemp): failed to create temp file: /data/data/com.example.hellojni 08-28 12:13:53.850: I/sh(19312): ==19315== VG_(mkstemp): failed to create temp file: /data/data/com.example.hellojni 08-28 12:13:53.850: I/sh(19312): ==19315== VG_(mkstemp): failed to create temp file: /data/data/com.example.hellojni 08-28 12:13:53.850: I/sh(19312): ==19315== VG_(mkstemp): failed to create temp file: /data/data/com.example.hellojni 08-28 12:13:53.850: I/sh(19312): valgrind: Startup or configuration error: 08-28 12:13:53.850: I/sh(19312): valgrind: Can't create client cmdline file in ??8L?8 08-28 12:13:53.850: I/sh(19312): valgrind: Unable to start up properly. Giving up. 08-28 12:13:53.850: I/logwrapper(19312): sh terminated by exit(1)
答案 0 :(得分:0)
尝试让valgrind使用默认目录'/ data / local / tmp'和 chmod 777 对'/ data / local / tmp'的权限