flatbuffers
flatbuffers copied to clipboard
[swift] use loadUnligned instead of load (#7640)
PR for fixing issues #7640
@mr-swifter can you also run the fuzzer for like 5 mins?
Just ran the fuzzer for a couple of mins! It seems to work without any issues, always remember to getACheckedRoot to verify the data is proper. @mustiikhalil , may you guide me how to do this? Do you mean
tests/fuzzer
? But how I need to hook swift code for this? Or do I miss something completely? Thanks
@mr-swifter so this is a bit tricky, since you will need to follow this:
- https://github.com/apple/swift/blob/main/docs/libFuzzerIntegration.md
- https://github.com/apple/swift-protobuf/tree/main/FuzzTesting
and mainly run in the tests/swift/tests
xcrun --toolchain "Swift Development Snapshot" swift build -c debug -Xswiftc -sanitize=fuzzer,address -Xswiftc -parse-as-library
I couldnt manage to make it run on arm64
though (always got a seg fault), i had to switch to x86
@mustiikhalil , thanks for advice, let me try
What is the status on this one?
What is the status on this one?
Hi @dbaileychess , this case is not forgotten, I just stuck with some backlog in my project. I believe I will do this soon.
Converting to a draft, please upgrade when ready to review again.
Seems investigate clearly show there is a performance regression because of using loadUnaligned
instead of load
. Should we go with conditional compilation then as what originally suggested?
@mustiikhalil @mr-swifter Status on this?
I vote for closing it until it's properly baked
Feel free to reopen when more work is done.