Comments (2)
So if I understand the issue correctly, the problem occurs on x86_64 only and only on macOS 10.12. I'm not sure what the stack alignment on macOS is but it is indeed most likely 16. The warning is then probably triggered because the compiler cannot guarantee that the struct will be aligned to 32 bytes. If this is a problem or not really depends on the instructions that the compiler generates, in the old days compilers generated 'load aligned' (e.g. _mm256_load_pd) instructions which would break if the object wasn't 32 byte aligned. I think modern compilers don't do this anymore (they emit e.g. _mm256_loadu_pd), so I would expect that ignoring the warning would not really cause problems.
B.t.w. it doesn't help for this particular case because they only support Apple Silicon macs, but I don't own a mac either and I use scaleway to rent a virtual mac for day if I need one.
from joltphysics.
and only on macOS 10.12
Technically when targeting any version prior to 10.14 I guess, but yes, 10.12 and 10.13 in this case.
The warning is then probably triggered because the compiler cannot guarantee that the struct will be aligned to 32 bytes
I'm out of my depth here, but I don't get the impression that this is what the problem is. Judging by the error I get the impression that the compiler has some generated code in the implicit destructor (although I can't fathom what exactly) that makes use of the global delete
that takes a std::align_val_t
, which from what I've gathered it would have to use for deleting anything with an alignment larger than sizeof(max_align_t)
, as is the case here. macOS/OSX 10.12 doesn't seem to provide these in its C++ runtime, presumably for the same reason it didn't provide aligned_alloc
prior to 10.15, as mentioned in #738, which I guess makes some kind of sense since they're both relatively recent additions (C++17).
Either way, given that this would probably require testing with whatever C++ runtime 10.12 shipped with, I don't think either one of us will be able to definitively know if any fix is truly viable, but I'd probably be fine with adding -faligned-allocation
either on my end or yours and call it a day.
B.t.w. it doesn't help for this particular case because they only support Apple Silicon macs, but I don't own a mac either and I use scaleway to rent a virtual mac for day if I need one.
Ah, good to know, thank you!
from joltphysics.
Related Issues (20)
- Crash on Mutex::lock() - 0x00007ffbd9232ff0 MSVCP140.dll!UnknownFunction HOT 2
- Spheres collide with internal edges despite mitigations HOT 6
- Compilation fails with g++ on Ubuntu 22.04 HOT 5
- Missing documentation on how to destroy a physics object. HOT 2
- `-mfpmath=sse` is not supported by Emscripten HOT 5
- Request for official vcpkg support HOT 8
- Serialized arrays are not compatible between 32 and 64 bit systems HOT 1
- VS2022_CL build fails with warning C4514 HOT 2
- Linux-on-ARM compile errors HOT 6
- Core.h defines JPH_USE_NEON HOT 3
- Error when generating build files for Ninja and clang-cl HOT 6
- Request for Anisotropic Friction HOT 1
- Compiles but doesn't run in Arch linux HOT 2
- [Feature request] Implement gravity override for all bodies and not just vehicle constraints
- QuadTree stack HOT 1
- getters for attributes of tapered shapes (enhancement request) HOT 4
- Program crashes when creating body HOT 2
- Issues deriving from Jph classes such as Shape HOT 2
- ld: error: undefined symbol: pthread_create on FreeBSD HOT 2
- ConstraintManager Add/Remove crashes with nullptrs HOT 1
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 joltphysics.