circle icon indicating copy to clipboard operation
circle copied to clipboard

Code compiles without problems but executable crashes

Open sobkas opened this issue 1 year ago • 0 comments

#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

sobkas avatar Oct 24 '24 08:10 sobkas