I managed to get the function which is causing segmentation fault in reading B+tree based directories.
Basically I included lots of TRACE call and finally got where our code is breaking
Its this function BPlusTree.cpp\xfs\file_systems\kernel\add-ons\src - haiku - Haiku's main repository.
Now to fix it, I checked the values of parameters we are passing in read_pos function and got one strange result : path[i].blockData = 0
, remaining parameter values are fine with respect to other successfully read directories.
Another thought I have is why it doesn’t show us proper ERROR? Right now it simply gives segmentation fault.
I did some more testing to get that which function call to SearchAndFillPath
is breaking code I found this BPlusTree.cpp\xfs\file_systems\kernel\add-ons\src - haiku - Haiku's main repository function call to be giving segmentation fault.
Now we are passing DATA
as parameter in this call which gives us our path
as fPathForData
.
There isn’t any fixed number of directories we can read successfully, sometimes it is 20K and sometimes just 1k.
But the cause of segmentation fault is same in every testing I did.
Anyone having Ideas on how can I fix this or maybe some more TRACE I should look into to get more clear picture about problem?