-
Notifications
You must be signed in to change notification settings - Fork 769
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
Needs C++17 over-aligned new operator #21
Comments
Thanks for flagging! Two concerns I have:
|
Hi! C++11 introduced That's great for variables in the stack (local variables), but what happens with this?
the last line calls the good old new(), which ignores the alignas constraints, leading to runtime crashes if (by chance) the returned address does not fulfill with the required alignment. Now, that is finally fixed in C++17: And it seems to have been well-received in Eigen: http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1409 But... if the users (us) do not enable C++17, the new I think there exist these solutions:
Anyway, I think this issue has a low priority... unless unexpected random crashes start to show up while running optimized code (!). |
What OS, compiler, and C++ standard are you using when you get this warning? I don't think I've ever seen this. (I'm mostly on Ubuntu 16.04, C++14, gcc 5.4 or clang 8.0) Eigen already provided a way to handle alignment for SSE3, AVX2, etc. which works in C++11 & C++14. Per the instructions at I think we are probably just missing |
Actually, I see |
I guess it depends on how much you can bear people complaining about it :-)
Hmm... there's actually a workaround if you like it:
|
It took me a while to reproduce it too... it only happens when building the tests, not the regular libraries.
|
I don't know why, but this is not showing up anymore, so I guess it could be closed. |
Just found another instance of this same issue, so reopening again:
This happens with g++9 under amd64 and u18.04. |
Closed by #185 |
62161cd20 Merge pull request #21 from borglab/feature/script-vars 93be1d9f8 set script variables and move pybind11 loading so gtwrap can be used under gtsam git-subtree-dir: wrap git-subtree-split: 62161cd200512e65133b7c4bc8f790b7ba769b40
09f8bbf71 Merge pull request #25 from borglab/fix/function-name 0dbfb6c13 fix function name to be the correct one f69f8b01f Merge pull request #24 from borglab/fix/pip 6519a6627 use pip install to overcome superuser issues b11ecf4e8 Merge pull request #23 from borglab/fix/remove-pip-args 813030108 remove pip-args since we are using setup.py 498d233e0 Merge pull request #22 from borglab/fix/package-install 846212ac3 set correct flags for installing gtwrap package 62161cd20 Merge pull request #21 from borglab/feature/script-vars 93be1d9f8 set script variables and move pybind11 loading so gtwrap can be used under gtsam 8770e3c7e Merge pull request #20 from borglab/fix/pybind-include 8c3c83618 proper placement of pybind11 include a9ad4f504 Merge pull request #19 from borglab/feature/package 99d8a12c7 added more documentation 4cbec1579 change to macro so we don't have to deal with function scopes b83e405b8 updates to completely install the package 38a64b3de new scripts which will be installed to bin directory bf9646235 Merge pull request #18 from borglab/fix/cmake-min c7c280099 Consistent cmake minimum required 42df58f62 Merge pull request #17 from borglab/fix/cleanup e580b282d version bump 4ccd66fa5 More finegrained handling of Python version 6476fd710 Merge pull request #16 from borglab/feature/better-find-python 8ac1296a0 use setup.py to install dependencies e9ac473be install dependencies and support versions of CMake<3.12 cf272dbd2 Merge pull request #15 from borglab/feature/utils ffc9cc4f7 new utils to reduce boilerplate 20e8e8b7a Merge pull request #11 from borglab/feature/package 04b844bd6 use new version of FindPython and be consistent 3f9d7a32a Merge pull request #13 from borglab/add_license c791075a6 Add LICENSE 517b67c46 correct working directory for setup.py 1b22b47ae move matlab.h to root directory 37b407214 Proper source directory path for use in other projects 61696dd5d configure PybindWrap within the cmake directory 1b91fc9af add config file so we can use find_package a1e6f4f53 small typo da9f351be updated README and housekeeping 64b8f78d5 files needed to allow for packaging bddda7f54 package structure git-subtree-dir: wrap git-subtree-split: 09f8bbf7172ba8b1bd3d2484795743f16e1a5893
While building tests:
Need to investigate a bit more, but it's likely due to Eigen memory constraints.
Are you ok with adding
-faligned-new
as a private/public flag to gtsam libraries to solve this? Otherwise, I guess this may lead to random crashes if "optimizing for native" is enabled.The text was updated successfully, but these errors were encountered: