Code Monkey home page Code Monkey logo

Comments (2)

jrouwe avatar jrouwe commented on June 22, 2024

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.

mihe avatar mihe commented on June 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.