- Instead of intercepting gsl_memory_alloc_pure in libgsl.so (which corrupted
the stack frame and crashed 5-argument callers like libGLESv2_adreno in
android.hardware.camera.provider-service_32), bridge the legacy 3-argument
calling convention directly inside libC2D2.so.
- Restore standard Pong calling convention in 32-bit libgsl.so while keeping
the defensive null check on error return.
Change-Id: I494c15e9f7cca5bcb8a0d786e0034b8fed5dfd9e
- When graphics blobs were updated from pong, gsl_memory_alloc_pure changed
its calling convention to 64-bit size, causing 32-bit legacy blobs like libC2D2
to pass mismatched arguments (flags corrupted to memdesc pointer, memdesc null).
- This caused kgsl_sharedmem_alloc to fail and crash vendor.qti.media.c2@1.0-service
on null pointer dereference during video encoding (e.g. scrcpy, video recording).
- Add trampoline to correctly bridge 32-bit gsl_memory_alloc_pure calls to
gsl_memory_alloc_pure_64 and add null check on error path in libgsl.
Change-Id: Ic6b835fbf2ffd876789e9b332bc26634e303c0f4