-
Notifications
You must be signed in to change notification settings - Fork 314
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
Potential hash collision by using v8::Module::GetIdentityHash() #518
Comments
I came across this when searching for other projects having issues with |
Ok thanks - good to know. |
Hi! Is there an estimate on this issue? We're using GetIdentityHash() to identify objects, and we would like to know if we can rely on it or not. |
@zbendefy I've had no problems with it. |
@ry We'll use potentially thousands of objects, that we are identifying (for storage in a hashmap) using GetIdentityHash(). We didn't do thorough testing yet, but having a Stable way to identify JS objects would be nice. I presume that we cannot use the underlying pointer values behind a Local<> or Persistent<> handle? |
@ry Is this still relevant? |
Yes |
These bindings are now in |
This is not for rusty_v8 to fix. The identity hash itself isn't buggy but it can be used in a way that introduces bugs. To summarize:
You can use it to store objects in a hashmap but you need to additionally check with |
https://github.com/denoland/deno/blob/1e5e091cb074896c7550b1b6f802582f12629048/libdeno/binding.cc#L293
Seems very unlikely people will hit this issue - but creating something just to track it.
The text was updated successfully, but these errors were encountered: