]> git.cworth.org Git - apitrace/commit
egltrace/android: Fix tracing Zygote processes
authorAlexander Monakov <amonakov@ispras.ru>
Mon, 17 Jun 2013 16:36:06 +0000 (20:36 +0400)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 17 Jun 2013 18:10:40 +0000 (19:10 +0100)
commit4460388e76648d908b71f3f5ea46d8ce2af39234
tree1243c110c016c9559c207bce58b0611fd3dce81f
parent9882c5f08f337ce494e040e01a6f79816f92170e
egltrace/android: Fix tracing Zygote processes

The root cause of the problem was a bug in the implementation of
getZygoteProcessName.  When the wrap.$procname approach is used, reading
/proc/cmdline produces "$procname\0/system/bin\0--application\0"... (with
embedded zero characters).

Fixed by simply not supplying length argument to the truncate call, which will
truncate to strlen().  The same bug is also present in getProcessName.
wrappers/trace.cpp