Boost serialization implementation#641
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces Boost.Serialization support to the library, implementing the necessary Reader, Writer, and Parser components to handle various data types. It also includes IO utilities for binary archives and a comprehensive suite of unit tests. The review feedback identifies a critical issue in the read_object function where errors were not being propagated, potentially leading to silent failures, and suggests a performance optimization to avoid redundant memory copies when reading from byte buffers.
57031b0 to
df96f7c
Compare
|
undid the gemini code assist suggestion (57031b0) |
|
@ron0studios let me know when this is ready for review |
|
@ron0studios I just had a quick look. I think you're on the right track. I look forward to having this. |
|
@liuzicheng1987 Ready for review - everything but docs is written through. The remaining work was a matter of writing tests to see if some edge cases already worked out the box or not :) |
|
@ron0studios , first of all, thanks for the contribution. This looks great and it inspired me to support https://github.com/USCiLab/cereal next. I have a couple of minor remarks:
As a final remark, I am a bit concerned about security here, as there appears to be next to no validation...I wonder to what extent it would be possible to add a malicious file to get the code to do things it's not supposed. But this seems to be a general problem with Boost.Serialization and it's certainly not our job to fix it. If you want to me to take over any of the points 1-5, I'd be happy to do so. |
|
@liuzicheng1987 thanks for reading through! I'm happy to go through 1-5 :) I have never tackled the security side of things before, so I'm not sure how helpful I can be on that front unfortunately. I'll keep you posted! |
0c032d9 to
13c4867
Compare
|
@ron0studios, I have since added the cereal support, so please merge main once and resolve the merge conflicts in the CMakeLists (which should be very easy). |
|
@ron0studios other than that, looks good to me. If the tests run smoothly, I see no reason not to merge this, unless you want to add your optimization first. |
|
@ron0studios, the tests look good. The two failures are obviously a server issue, nothing to do with your code. So if you could merge main, that would be great. I would then merge the PR, unless you want to do the optimization first. |
|
rebased against origin/main just earlier @liuzicheng1987. Happy to get this merge through :) |
|
@ron0studios merged. Thanks for your contribution! |

A simple boost.serialization custom format for rfl.
Currently the basics are supported, but I feel adding patches will be outside the scope of this very first PR.
TODO: