diff options
author | Haitao Feng <haitao.feng@intel.com> | 2014-12-31 13:48:08 +0800 |
---|---|---|
committer | Lajos Molnar <lajos@google.com> | 2015-01-08 19:09:22 +0000 |
commit | 67f304e2ca0d7a93730669b143bb30ef6a3f7199 (patch) | |
tree | 0bce9944f0fb60f094114f2539101dd8872be542 /media/jni/audioeffect | |
parent | d3b69567e3b6891574b8f06e3fc88ba91d4f7436 (diff) | |
download | frameworks_base-67f304e2ca0d7a93730669b143bb30ef6a3f7199.zip frameworks_base-67f304e2ca0d7a93730669b143bb30ef6a3f7199.tar.gz frameworks_base-67f304e2ca0d7a93730669b143bb30ef6a3f7199.tar.bz2 |
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>
Diffstat (limited to 'media/jni/audioeffect')
-rw-r--r-- | media/jni/audioeffect/android_media_Visualizer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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); } } |