Just to know... If hangs of fuse daemon is caused by buffer overflow Why problem didnt occour with exFat? Buffer overflow is indipendent from fs in this case right?
I don't think it's a buffer overflow.
If it were, then cgx's tricks for forcing those variables to be in memory instead of registers would have made things worse, not better.
Seems like some sort of issue with restoring state after an interrupt, but it's still really just a guess. It's likely timing related and using exfat as an underlying filesystem changes the timing (or alters the behavior of pread64() in other ways).
All we know is:
A function sets up a few variables
Then that function calls the pread64() syscall (which reads data from the underlying filesystem - so changing to exfat is going to fundamentally change how this call does its thing)
When pread64() returns, some of the variables in the function that called it have been corrupted - even though in any sane system there is no way for that to happen. (In a properly working system/compiler, if you never pass a variable to a function it should NEVER be touched. Even if you pass a variable to a function, if you didn't pass it via a pointer, it shouldn't be touched.)
That's what makes this so difficult to debug - we know why the problem is happening, we know exactly which function is causing the problem, except *there should not be any way that function can cause this kind of problem* (and we can't replace the function with something else... reading data from the underlying filesystem is pretty damn important.)