septag/dmon

[Windows] potential memory corruption

franko opened this issue · 2 comments

I am chasing a difficult to reproduce bug in my application using dmon.

It seems to happen when I get a lot of accumulated files' events when the application is unfocused, for example when I switch to the terminal and I delete recursively a directory with a lot of files in a place monitored by dmon. I suspect a memory corruptions starting in dmon but I am not sure about that.

So I am asking, if I want to investigate in the dmon implementation for Windows what things may cause a buffer overflow or something similar when a lot of events are reported ?

Just for completeness: on windows I use dmon recursively on the directory to monitor and I watch only a single directory.

sorry for late reply.
It's difficult to say, it can be anything, but you can run your code with ASAN. and be aware that the callbacks are called from a worker thread. I doubt that buffer overflow will happen, because it's using a dynamic heap array, unless you have like more than 2 billion events happening.
I didn't see any issue like that. but on the other hand, I never tried your scenario. I'll keep this open and try to reproduce your bug.

septag commented

I guess there is no repro here (I hope so at least), closing it for now.