Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alloc-dealloc-mismatch (operator new [] vs free) in libasan_preload.so #692

Closed
daliands opened this issue Jun 20, 2016 · 1 comment
Closed

Comments

@daliands
Copy link

I copy libasan.rt_arm_android.so to /system/lib/libasan_preload.so,then run shell with command: asanwrapper /system/bin/app_process "/system/bin" "--application" "--nice-name=com.ryu.asandemo" "com.android.internal.os.WrapperInit" "11" "20" "android.app.ActivityThread"

==2207==Parsed ASAN_OPTIONS: debug=1,verbosity=1
02-03 21:30:25.453: I/(2207): ==2207==AddressSanitizer: libc interceptors initialized
02-03 21:30:25.460: I/(2207): || [0x18000000, 0xbfffffff] || HighMem ||
02-03 21:30:25.460: I/(2207): || [0x03000000, 0x17ffffff] || HighShadow ||
02-03 21:30:25.460: I/(2207): || [0x00040000, 0x02ffffff] || ShadowGap ||
02-03 21:30:25.460: I/(2207): MemToShadow(shadow): 0x00000000 0x00000000 0x00600000 0x02ffffff
02-03 21:30:25.461: I/(2207): redzone=16
02-03 21:30:25.461: I/(2207): max_redzone=2048
02-03 21:30:25.461: I/(2207): quarantine_size=64M
02-03 21:30:25.461: I/(2207): malloc_context_size=30
02-03 21:30:25.461: I/(2207): SHADOW_SCALE: 3
02-03 21:30:25.462: I/(2207): SHADOW_GRANULARITY: 8
02-03 21:30:25.462: I/(2207): SHADOW_OFFSET: 0
02-03 21:30:25.462: I/(2207): ==2207==Installed the sigaction for signal 11
02-03 21:30:25.469: I/(2207): ==2207==T0: stack [0xbe365000,0xbeb65000) size 0x800000; local=0xbeb6417c
02-03 21:30:25.469: I/(2207): ==2207==Failed to open libcorkscrew.so. You may see broken stack traces in SEGV reports.
02-03 21:30:25.470: I/(2207): ==2207==AddressSanitizer Init done
02-03 21:30:25.530: D/AndroidRuntime(2207): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
02-03 21:30:25.551: D/AndroidRuntime(2207): CheckJNI is OFF
02-03 21:30:25.647: I/(2207): ==2207==T1: stack [0xaba00000,0xabb00000) size 0x100000; local=0xabaffd6c
02-03 21:30:25.647: I/(2207): ==2207==T3: stack [0xb2a00000,0xb2b00000) size 0x100000; local=0xb2affd6c
02-03 21:30:25.648: I/(2207): ==2207==T2: stack [0xb3c00000,0xb3d00000) size 0x100000; local=0xb3cffd6c
02-03 21:30:25.650: I/(2207): ==2207==T4: stack [0xb2602000,0xb2700000) size 0xfe000; local=0xb26ffd6c
02-03 21:30:25.652: I/(2207): ==2207==T5: stack [0xb2402000,0xb2500000) size 0xfe000; local=0xb24ffd6c
02-03 21:30:25.655: I/(2207): ==2207==T7: stack [0xab6f0000,0xab7f4000) size 0x104000; local=0xab7f3d6c
02-03 21:30:25.655: I/(2207): ==2207==T6: stack [0xab7fc000,0xab900000) size 0x104000; local=0xab8ffd6c
02-03 21:30:25.656: I/(2207): ==2207==T8: stack [0xab5e2000,0xab6e6000) size 0x104000; local=0xab6e5d6c
02-03 21:30:25.656: I/(2207): ==2207==T9: stack [0xab4d4000,0xab5d8000) size 0x104000; local=0xab5d7d6c
02-03 21:30:25.656: I/(2207): ==2207==T10: stack [0xab3c8000,0xab4cc000) size 0x104000; local=0xab4cbd6c
02-03 21:30:25.669: I/(2207): =================================================================
02-03 21:30:25.669: I/(2207): �[1m�[31m
02-03 21:30:25.669: I/(2207): ==2207==ERROR: AddressSanitizer: alloc-dealloc-mismatch (operator new [] vs free) on 0xb1d04770
02-03 21:30:25.669: I/(2207): �[1m�[0m
02-03 21:30:25.676: I/(2207): #0 0xb6aeed59 (/system/lib/libasan_preload.so+0x42d59)
02-03 21:30:25.677: I/(2207): #1 0xaff8b10f (/system/lib/asan/libart.so+0x19210f)
02-03 21:30:25.677: I/(2207): #2 0xaff8c3b3 (/system/lib/asan/libart.so+0x1933b3)
02-03 21:30:25.677: I/(2207): #3 0xaff8e621 (/system/lib/asan/libart.so+0x195621)
02-03 21:30:25.678: I/(2207): #4 0xb00900e1 (/system/lib/asan/libart.so+0x2970e1)
02-03 21:30:25.678: I/(2207): #5 0xaff8ef95 (/system/lib/asan/libart.so+0x195f95)
02-03 21:30:25.678: I/(2207): #6 0xaff904e3 (/system/lib/asan/libart.so+0x1974e3)
02-03 21:30:25.679: I/(2207): #7 0xb6a4c2e3 (/system/lib/asan/libc.so+0x162e3)
02-03 21:30:25.679: I/(2207): #8 0xb6a4a2d3 (/system/lib/asan/libc.so+0x142d3)
02-03 21:30:25.679: I/(2207): �[1m�[32m0xb1d04770 is located 0 bytes inside of 9-byte region [0xb1d04770,0xb1d04779)
02-03 21:30:25.679: I/(2207): �[1m�[0m
02-03 21:30:25.680: I/(2207): �[1m�[35mallocated by thread T5 here:�[1m�[0m
02-03 21:30:25.680: I/(2207): #0 0xb6aef83d (/system/lib/libasan_preload.so+0x4383d)
02-03 21:30:25.686: I/(2207): #1 0x200003 ()
02-03 21:30:25.687: I/(2207): Thread T5 created by T0 (om.ryu.asandemo) here:
02-03 21:30:25.687: I/(2207): #0 0xb6ad9b73 (/system/lib/libasan_preload.so+0x2db73)
02-03 21:30:25.693: I/(2207): #1 0xafa03687 ()
02-03 21:30:25.694: I/(2207): SUMMARY: AddressSanitizer: alloc-dealloc-mismatch ??:0 ??
02-03 21:30:25.694: I/(2207): ==2207==HINT: if you don't care about these warnings you may set ASAN_OPTIONS=alloc_dealloc_mismatch=0
02-03 21:30:25.694: I/(2207): ==2207==ABORTING

@morehouse
Copy link
Contributor

2 years old. Please re-open with more details if this is still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants