-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor get_port to use FNV-1a hash for consistency across platforms #634
Conversation
Confirmed this works! |
@deanlee this breaks PlotJuggler streaming, can you make a PR to fix? |
Just need to rebuild PJ? |
Thanks @deanlee, this makes it easier to derive the same port from other languages! |
yea, confirmed PJ is broken. I wasn't even able to build/run PJ before so unsure if it was caused by this PR. |
I can't stream either. Last commit from OP stream worked I checked was On the commit prior to this MR, streaming was working 3e17f86 |
That's what it looks like from looking on https://github.com/commaai/PlotJuggler/blob/5dff41cfd5d046711bdcf255665c816852056beb/plotjuggler_plugins/DataStreamCereal/datastream_cereal.cpp#L79 |
Can we confirm that PJ only needs a rebuild for this to be fixed? |
y. make sure to update to the latest master branch of common/PlotJugglere before rebuilding. |
…commaai#634) Fix ZMQ issue caused by mismatched port values between macOS and Linux
resolve commaai/openpilot#34031 :
This pr fixes the issue where the
get_port
function returns different port values on macOS and Linux due to platform-specific behavior ofstd::hash
. The mismatch in port values causes connection failures in ZMQ. The solution replacesstd::hash
with a custom FNV-1a hash function to ensure consistent port values across platforms, and reducing the risk of collisions.