Comments (7)
Did you try to compile with #3461? Like I said, I can't reproduce your results.
Edit: it is, indeed, 16 bytes in g++. I'll look into it.
from xmrig.
#3462 should fix it.
from xmrig.
sizeof(p) is 8, and your code prints sizeof(p) 8 sizeof(engine)/256 8
when I compile it in MSVC. What compiler version did you use? Maybe you used some special compiler settings?
from xmrig.
In any case, this PR should make this a compile-time problem instead: #3461
If it compiles, you can be sure pointer sizes match.
from xmrig.
sizeof(p) is 8, and your code prints
sizeof(p) 8 sizeof(engine)/256 8
when I compile it in MSVC. What compiler version did you use? Maybe you used some special compiler settings?
It is not only on MSVC.
When built on Ubuntu, g++ then it prints
sizeof(p) 16 sizeof(engine)/256 8
So it is also not correct and again memcpy spoils memory after engine array.
I noticed that because when my own JIT compiler implementation grows with code then sometimes it works and sometimes does not work just because unpredictable behave. And seem reason is those handler pointers.
from xmrig.
Thank You!
Seems now fixed.
PS: Someone can explain why compilers can reserve too much bytes per simple pointer? I have no idea why..
from xmrig.
I found this article on the topic: https://devblogs.microsoft.com/oldnewthing/20040209-00/?p=40713
from xmrig.
Related Issues (20)
- read error: "end of file" HOT 5
- Is it possible to hide the console thing? HOT 2
- buffer overflow detected HOT 15
- Mine on CPU and GPU different Coins
- Im getting an Error when i try to mine on RX 470 Graphics card HOT 4
- Problem when trying to build with Intel compiler HOT 2
- Building in OpenCL configuration on IBM POWER (ppc64el) HOT 1
- How to make XMRIG rest for x time every x time? HOT 5
- Segmentation fault when using opencl for cn/2 algo HOT 1
- Vega 56 crash when using OpenCL HOT 1
- XMRig compiling error HOT 2
- GLIBC error Linux Mint 20 HOT 4
- Add support for randomscash (Scash) & Randomtuske (Tuske)
- how to build correctly in windows 10? HOT 1
- Question regarding xmrig in VM - failed to find sysfs cpu topology directory HOT 3
- XMRig has a Windows ARM32 build? HOT 2
- `CL_OUT_OF_HOST_MEMORY` when run as systemd service HOT 3
- How to add a second donation address HOT 1
- Add support for scash #3445
- Is there a way to apply msr mod on a .cmd file? HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xmrig.