microsoft / microsoft/mimalloc

Mimalloc causes null-pointer-dereference

Open
#689 4 comments 0 reactions 0 assignees View on GitHub
stale
Dominant language
C
Stars
13.4k
Forks
1.2k
Avg merge
4d 45m
Merged PRs (30d)
13

Description

When using mimalloc for Android, Qualcom audio hal crashes with null-pointer-deref

```
Cause: null pointer dereference
r0 ea40011c r1 00000002 r2 00000001 r3 00000000
r4 e36f8c94 r5 ea498300 r6 00000000 r7 e7bbcc38
r8 ead344c0 r9 00000003 r10 ead344c0 r11 00000000
ip ea4000fc sp e36f8a08 lr e7ba29c1 pc e7ba29c0
backtrace:
#00 pc 000139c0 /vendor/lib/hw/sound_trigger.primary.msmnile.so (platform_stdev_assign_devices+36) (BuildId: 2a2f8be704db443b3664f38e4ed8eb06)
#01 pc 0000f441 /vendor/lib/hw/sound_trigger.primary.msmnile.so (sound_trigger_hw_call_back+140) (BuildId: 2a2f8be704db443b3664f38e4ed8eb06)
#02 pc 000a9f38 /vendor/lib/hw/audio.primary.msmnile.so (audio_extn_sound_trigger_update_stream_status+688) (BuildId: 29eca10b0b68cf43c705e1a3bb3e1723)
#03 pc 00036dbc /vendor/lib/hw/audio.primary.msmnile.so (enable_audio_route+432) (BuildId: 29eca10b0b68cf43c705e1a3bb3e1723)
#04 pc 00039e6c /vendor/lib/hw/audio.primary.msmnile.so (select_devices+5724) (BuildId: 29eca10b0b68cf43c705e1a3bb3e1723)
#05 pc 0003d118 /vendor/lib/hw/audio.primary.msmnile.so (start_output_stream+904) (BuildId: 29eca10b0b68cf43c705e1a3bb3e1723)
#06 pc 0004678c /vendor/lib/hw/audio.primary.msmnile.so (out_write+1580) (BuildId: 29eca10b0b68cf43c705e1a3bb3e1723)
#07 pc 000234a9 /vendor/lib/hw/android.hardware.audio@6.0-impl.so (android::hardware::audio::V6_0::implementation::(anonymous namespace)::WriteThread::threadLoop()+224) (BuildId: 9143287cd6e95a8f28ddf5bba67f6fe4)
#08 pc 0000d7cb /apex/com.android.vndk.v33/lib/libutils.so (android::Thread::_threadLoop(void*)+270) (BuildId: 649352b51708784e9a6d7e7d9765aaa6)
#09 pc 0008e8d3 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+40) (BuildId: b020d9ab03b9c833a35369da15bb7d07)
#10 pc 0003ca81 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30) (BuildId: b020d9ab03b9c833a35369da15bb7d07)
```

Source code can be found here https://github.com/BlissRoms/platform_vendor_qcom_opensource_audio-hal_st-hal

Any hints please?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the supplied ARM crash trace, especially platform_stdev_assign_devices, and inspect the linked Qualcomm audio HAL source. Reproduce the failure with mimalloc on Android and compare it with the default allocator. Done means identifying whether mimalloc or the audio HAL causes the null dereference and documenting a reproducible fix or next diagnostic step.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, c
Domain
mobile-dev
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.