MacOS freeze when call "NSFileCoordinator :: addFilePresenter" repeatedly.
Step:
1 We call the function NSFileCoordinator :: addFilePresenter to add monitoring files, the number of monitoring files exceeds 30,000, and the function addFilePresenter cannot return error code,
2 All applications cannot be opened, the command line prompts "Too many open files in system" in terminal, the system freeze
3 Root process "filecoordinationd" open many files
I have two questions:
1 Function “addFilePresenter” need to return error code when failure
2 I think this may be a system vulnerability. If the code calls function “addFilePresenter” repeatedly, the system may freeze