Skip to content

Conversation

@ChristopheLarchier
Copy link
Contributor

@ChristopheLarchier ChristopheLarchier commented Nov 13, 2025

Possibly in GetFileStat or GetNodeId.

GetProcAddress can throw an exception if the first parameter, GetModuleHandle(L”ntdll.dll”), is null, which can happen in case of OS corruption or if the function is not found (ERROR_PROC_NOT_FOUND).

@ChristopheLarchier ChristopheLarchier changed the title [Windows] Crash serveur - Exception dans le LocalFileSystemObserverWorker [Windows] Crash serveur - Exception in the LocalFileSystemObserverWorker Nov 13, 2025
try {
pzwQueryDirectoryFile = (PZW_QUERY_DIRECTORY_FILE) GetProcAddress(hModule, "ZwQueryDirectoryFile");
} catch (const std::exception &e) {
LOG_WARN(Log::instance()->getLogger(), "Exception in GetProcAddress: err=" << e.what());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe force the value of ioError to something (ex: Unknown). If I understand the code correctly, ioError is still equal to Success here and the log message on line 176 might be misleading.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done
c71e523

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants