Closed alexcohn closed 3 years ago
These two pages, File descriptor sanitizer (fdsan) and fdsan explain what has changed in Android 11 (API Level 30) and what must be done to fix this.
Unfortunately, they recommend to use fdsan
to close the native fds. But the problem is, fdsan is only available on API Level 29 >=. So, using fdsan
directly is not possible. Any suggestions?
Apparently, ParcelFileDescriptor.close()
method that we call inside Config.closeParcelFileDescriptor
is already closing the fd
. If we close the fd
again fdsan
complains that we're double-closing it. So, I'll remove the close
from the native method to fix this.
E/fdsan: double-close of file descriptor 64 detected
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This project will be retired. Please consider switching to FFmpegKit. This issue is fixed there.
Description This is the ffprobe command executed:
And this is the sigabrt crash:
Expected behavior
fdsan
should allow the SAF descriptor to be closedCurrent behavior
fdsan
considers the SAF descriptor as owned by ParcelFileDescriptorEnvironment
Android
arm64-v8a
4.4
development
4.1
21.1
Other Confirmed on emulator.