-
Notifications
You must be signed in to change notification settings - Fork 286
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
C++20 compilation leads to segmentation fault in erode and dilate #391
Comments
Your code does not compile as it is. There's missing |
If you use |
Ah ok, going to try that thank you |
Ok ran with the sanitize address flag and I've attached the output below. AddressSanitizer:DEADLYSIGNAL==3294763==ERROR: AddressSanitizer: stack-overflow on address 0x7fff86bfaffc (pc 0x55816a5f12de bp 0x7fff86bfb000 sp 0x7fff86bfaff0 T0) |
Thanks. It would be nice to have the line numbers as well. Could you add the |
Trying to integrate this library into some other packages we have that require C++20 for some functions to work.
I tried to compile a simple example . Without C++20 it works, but with it getting a segmentation fault at img_erode = ImgTest.get_erode(msk);
#define cimg_use_tif
#include <CImg.h>
#include < iostream >
using namespace cimg_library;
int main()
{
CImg ImgTest;
ImgTest.load_tiff("float_image.tif");
CImg out(ImgTest);
CImg img_erode(ImgTest);
CImg msk(5,5);
msk.fill(1);
img_erode = ImgTest.get_erode(msk);
std::cout << "Min: " << img_erode.min() << std::endl;
out = img_erode.get_dilate(msk);
std::cout << "Min: " << out.min() << std::endl;
out.save_tiff("V_float.tif");
return 1;
}
The text was updated successfully, but these errors were encountered: