Issue 104405
Summary new (align_val_t(...)) when launched clang from Microsoft Visual Studio 2022
Labels clang
Assignees
Reporter wmurw
    clang version 17.0.6 - installed by online installer Microsoft Visual Studio

If the code:
```C++
int main()
{
	size_t n = 5;
	double* Test = new(std::align_val_t(64)) double[n];
	delete[] Test;
	return 0;
};
```
compiled from the command line: ```clang main.cpp -std=c++17```, that code works.

But if you run it from Microsoft Visual Studio with the _clang_ compiler selected in its settings, an exception occurs on the ```delete[]``` operator:
"Unhandled exception at address 0x00007FF91976F439 (ntdll.dll) in Tests.exe: 0xC0000374: Heap was corrupted (parameters: 0x00007FF9197D97F0)."

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to