Possible Android 13 argv crash

Summary

The app store says my Android app is crashing on Android 13. It gives an address which I have resolved to fpc_pchar_to_ansistr with some uncertainty. One needs to investigate every call of fpc_pchar_to_ansistr in the RTL and my project...

ParamStr calls fpc_pchar_to_ansistr: https://gitlab.com/freepascal.org/fpc/source/-/blob/main/rtl/objpas/objpas.pp#L324 on a very dubious argv which is obtained from pointer walking from some unrelated place. I suppose, if the command line arguments are not there and that encounters something that looks like arguments, it will crash later

System Information

  • Operating system: Android 13
  • Processor architecture: AARCH64
  • Compiler version: 3.2.3

What is the current bug behavior?

The app store says my app is crashing

What is the expected (correct) behavior?

It should not crash

Possible fixes

I made an update after removing that stuff for the .so and my calls to Paramstr, and now the app store has not shown any crashes for two weeks.