-
Notifications
You must be signed in to change notification settings - Fork 89
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
Unable to read memory address bigger than 0xFFFFFFFF #9
Comments
I found why bug happen. In memory.h, the type of the second parameter is DWORD instead of DWORD64. I fix it by replacing DWORD to DWORD64. But we have another problem, in memoryjs.cc line 348, we get function argument with I'm not native C programmer so i quickfix that by adding 4294967296 to
This way i can handle 64 bits memory address |
#14 Should help fix this? |
Was there a better type to use that was sized depending on what it's compiled for. Is there really no Uint64Value methods? We could pass parameters with buffers. Or have the wrapper function pass an extra argument to flag it as an x64address then just internally in the native add the amount or subtract the amount. Or by use of another module? ffi gets around it by returning strings as double-precision floating point numbers are imprecise. A solution could also take into consideration if the methods should work with other architecture. |
I found out that uintptr_t is only part of the answer. https://github.com/Rob--/memoryjs/pull/14 |
You can see the changes in 3792f5d |
@karlrobertjanicki awesome, it seems as though IntegerValue is the solution for 64 bit integers: V8EXPORT uint32_t v8::Value::Uint32Value() const;
V8EXPORT int64_t v8::Value::IntegerValue() const; In your fork you don't replace all instances of Thanks! |
I didn't replace all the instances of Uint32Value() with IntegerValue() because I only used pointer, float and dword. Long story short: because of laziness ;) |
@karlrobertjanicki added in 646eb28. Also, there is no support for getting type |
Closing for now, if there is still problems with 64 bit compatibility I will reopen the issue! |
Thank you |
One more thing. I think that the base address is only correct in 64 Bit addresses with: |
@karlrobertjanicki addressed in abc9ee0. |
Perfect :) |
I have used memoryjs in a project. You can see the results on youtube |
@karlrobertjanicki Interesting project and awesome video! |
Thank you. Without memoryjs this would not be possible. Awesome work |
Hello,
I built memoryjs with npm run build64 but when i try to read memory with address that is bigger than 0xFFFFFFFF, it read wrong address.
For example, if i try to read address 0x141EA3612, it will return value of address 0x41EA3612 instead of 0x141EA3612 one.
My attached process is built with a 64bit architecture.
Do you have some idea to fix this ? Thanks
The text was updated successfully, but these errors were encountered: