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

Code compiles without problems but executable crashes #212

Open
sobkas opened this issue Oct 24, 2024 · 0 comments
Open

Code compiles without problems but executable crashes #212

sobkas opened this issue Oct 24, 2024 · 0 comments

Comments

@sobkas
Copy link

sobkas commented Oct 24, 2024

#feature on safety
#include <https://raw.githubusercontent.com/cppalliance/safe-cpp/master/libsafecxx/single-header/std2.h?token=$(date%20+%s)>

int main() safe {
  std2::vector<int> vec { 11, 15, 20 };

  for(int x :cpy vec) {
    std2::println(x);
  }
}
ASM generation compiler returned: 0
Execution build compiler returned: 0
Program returned: 139
free(): double free detected in tcache 2
Program terminated with signal: SIGSEGV

https://godbolt.org/z/18nv69Pxr

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

No branches or pull requests

1 participant