rizsotto / Bear

Bear is a tool that generates a compilation database for clang tooling.
GNU General Public License v3.0
4.83k stars 313 forks source link

Patch for intercept to support write returning short lengths #512

Closed asierllano closed 1 year ago

asierllano commented 1 year ago

EventDatabaseWriter calls write expecting to write the complete message or fail. Write does not work that way, it may happen to write part of the message and return just the number of bytes written. It has been fixed in order to continue the write process as it was left.

This prevents generating random corrupted outputs in a system with many intercept processes and heavy loads.

Bear-3.0.21-intercept-write.patch

rizsotto commented 1 year ago

Thanks @asierllano , this is merged now. Will be released as 3.1.1.