From 67f304e2ca0d7a93730669b143bb30ef6a3f7199 Mon Sep 17 00:00:00 2001 From: Haitao Feng Date: Wed, 31 Dec 2014 13:48:08 +0800 Subject: 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 Signed-off-by: Yong Yao --- media/jni/audioeffect/android_media_Visualizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'media/jni/audioeffect') diff --git a/media/jni/audioeffect/android_media_Visualizer.cpp b/media/jni/audioeffect/android_media_Visualizer.cpp index 8463d94..b59a541 100644 --- a/media/jni/audioeffect/android_media_Visualizer.cpp +++ b/media/jni/audioeffect/android_media_Visualizer.cpp @@ -329,7 +329,7 @@ static void android_media_visualizer_effect_callback(int32_t event, fields.midPostNativeEvent, callbackInfo->visualizer_ref, NATIVE_EVENT_SERVER_DIED, - 0, 0, 0); + 0, 0, NULL); } } -- cgit v1.1