Skip to content
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

Autobahn.js RequestID differs from turnpikes #102

Open
marshauf opened this issue Oct 1, 2015 · 3 comments
Open

Autobahn.js RequestID differs from turnpikes #102

marshauf opened this issue Oct 1, 2015 · 3 comments

Comments

@marshauf
Copy link
Collaborator

marshauf commented Oct 1, 2015

I am running turnpike on:
Architecture: armv7l
Byte Order: Little Endian
Which is 32Bit.

Autobahn.js RequestID differs from turnpikes.

I think the problem is:
type ID uint

Autobahn.js chooses for example this ID: 2267980555616256
Which overflows with uint on an 32bit system.

At a quick glance I couldn't find any information on what bit size the ID is.

@marshauf
Copy link
Collaborator Author

marshauf commented Oct 1, 2015

Ah I found it:

IDs in the global scope MUST be drawn randomly from a uniform distribution over the complete range [0, 2^53]

Which means type ID uint needs to be uint64

@jcelliott
Copy link
Owner

Good catch. I changed the maxID const to int64, but I forgot the ID type.

@marshauf
Copy link
Collaborator Author

marshauf commented Oct 1, 2015

I found another 10 cases where an uint is used for an ID.
All in router.go. They are mostly related to callbacks.
The program will most likely panic now due an overflow error on 32Bit system instead of handling it while decoding(?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants