Why does “for (auto const& dir_entry : std::filesystem::directory_iterator{sandbox}) {}” trigger AddressSanitizer: heap-buffer-overflow?
I have nailed down that the following code, when compiled with g++14 and adress sanitizers (See details below), triggers a runtime ‘AddressSanitizer: heap-buffer-overflow’ for the for-statement looping over std::filesystem::directory_iterator{sandbox}.