-
Notifications
You must be signed in to change notification settings - Fork 13.5k
operator delete[] leads to "index out of range" crash when using Microsoft ABI #12705
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
Comments
assigned to @timurrrr |
$ build/Release+Asserts/bin/clang++ -Xclang -cxx-abi -Xclang microsoft del.cpp tools/clang/lib/CodeGen/MicrosoftCXXABI.cpp simply does not implement ReadArrayCookie(). |
Good catch, Alexander! I'll add this method with llvm_unreachable then. |
In r153990 I've overridden ReadArrayCookie() to at least produce a readable error text. |
I think I came up with a piece of code that deals with cookies in Microsoft ABI, |
I believe this should be fixed in r155886; re-open this if I'm mistaken. |
mentioned in issue llvm/llvm-bugzilla-archive#12477 |
Extended Description
$ clang++.exe
clang version 3.1 (trunk 152788)
Target: i686-pc-win32
Thread model: posix
$ more operator_delete_array.cpp
int main() {
char *ptr = 0;
delete [] ptr;
}
$ clang++.exe -Xclang -cxx-abi -Xclang microsoft operator_delete_array.cpp
Assertion failed: Idx < getNumArgs() && "Argument index out of range!", file clang\include\clang/Basic/Diagnostic.h, line 994
clang++: error: clang frontend command failed with exit code 3 (use -v to see invocation)
The text was updated successfully, but these errors were encountered: