Use NULL instead of 0 when invoking CallStaticVoidMethod
static void CallStaticVoidMethod is variable argument function. if pass 0 to the function like: CallStaticVoidMethod(......, 0), 0 will be treated as INT data type.but in the CallStaticVoidMethod implement 0 will be treated as pointer data type.Pointer in 64bit system occupied 8 bytes, but in 64bit system int occupied 4 bytes. if call function like: CallStaticVoidMethod(......, 0), only low 4 bytes will be assigned 0.Turned out it actually call function like this: CallStaticVoidMethod(......, 0xXXXXXXXX00000000). intent to pass NULL to function but passed non-NULL parameter to the function.this will cause GCDaemon crash. Bug: 18911458 Change-Id: I9d700d3790a80dbee6826f64baf9ef5d81ca390f Reviewed-by: Liao, Bruce <bruce.liao@intel.com> Signed-off-by: Yong Yao <yong.yao@intel.com>
Loading
Please register or sign in to comment