Skip to content
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

schwartz_adapter segfaults on the Travis GCC Windows build #144

Open
Morwenn opened this issue Feb 20, 2019 · 2 comments
Open

schwartz_adapter segfaults on the Travis GCC Windows build #144

Morwenn opened this issue Feb 20, 2019 · 2 comments

Comments

@Morwenn
Copy link
Owner

Morwenn commented Feb 20, 2019

The issue

Many of the schwartz_adapter tests segfault with the following configuration:

  • 64-bit MinGW-w64
  • Release mode
  • Sorting a wrapper<double>

Instead of just Release mode, we can reduce the issue to the following flags: -O2 -finline-functions -fpeel-loops -ftree-loop-vectorize -fno-omit-frame-pointer -g.

No amount of warnings, sanitizers, Valgring or static analyzers catch any issue in any configuration mode. It just segfaults with the configuration described above.

It looks like a codegen issue more than an actual programming error.


Legacy issue

While it works everywhere else (including my home computer where I use MinGW-w64), every test using schwartz_adapter segfaults in the new experimental travis-windows branch of the library when GCC is used, and only in Release mode.

It might be linked to #138, but if it's not the case finding the issue might prove more difficult.

@Morwenn Morwenn added the bug label Feb 20, 2019
@Morwenn
Copy link
Owner Author

Morwenn commented Mar 10, 2019

I still don't understand where it comes from: I'm passing const lvalues to memory whose lifetime ends after all the machinery is done, so I don't understand where the segfaults might come from.

@Morwenn
Copy link
Owner Author

Morwenn commented Mar 18, 2019

Cicada says it looks more and more like a codegen bug and managed to reduce the problematic optimization falgs to the following ones: -O2 -finline-functions -fpeel-loops -ftree-loop-vectorize -fno-omit-frame-pointer -g

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant