hfsplus: fix segfault when deleting all attrs of a file
A message that is not in the archive (sent off-list or not yet received): [email protected]
--------------------------------------------
Quoted 5 lines · Ernesto A. Fernández
A segmentation fault can be triggered by setting many xattrs to a file
and then deleting it. The number must be high enough for more than one
b-tree node to be needed for storage.
Sounds like it is easily/reliably reproducible - do you have an estimate/recipe of how many xattrs minimum to trigger this problem, to test and verify this fix?
Thanks a lot for the work!
Hin-Tak
Quoted 11 lines · Hin-Tak Leung
--------------------------------------------
Quoted 5 lines · Ernesto A. Fernández
A segmentation fault can be triggered by setting many xattrs to a file
and then deleting it. The number must be high enough for more than one
b-tree node to be needed for storage.Sounds like it is easily/reliably reproducible - do you have an estimate/recipe of how many xattrs minimum to trigger this problem, to test and verify this fix?
I did not give a number because it depends on the size of the xattrs, and I imagine the bnode size as well, though I only tested it with the default mkfs options. Maybe I should have shared the script I used instead:
touch test.file
i=1
while [ $i -le 250 ]; do
setfattr -n user.$i test.file
((++i))
done
rm test.file
Of course, if you set a value to the xattrs you will need fewer.
Quoted 1 line
Thanks a lot for the work!
And thank you for your attention.
Quoted 3 lines
Hin-Tak
Ernest