[cfe-dev] clang 3.2 libclang: crash detected during reparsing
Argyrios Kyrtzidis
akyrtzi at gmail.com
Wed Jan 16 10:14:51 PST 2013
Fixed in r172632, thanks!
On Jan 15, 2013, at 9:36 PM, Oliver <ogtifs at gmail.com> wrote:
> Hi,
> Some example code for document editing I was using with clang 3.1 now segfaults on clang 3.2:
>
> #include <clang-c/Index.h>
> #include <string.h>
>
> char DOCUMENT[] = "int main() { return 0; }\n";
>
> int main(int argc, char** argv) {
> const char* args;
> CXIndex ci = clang_createIndex(0,0);
> CXTranslationUnit tu =
> clang_parseTranslationUnit(ci, "main.cpp", &args,
> 0, NULL, 0, clang_defaultEditingTranslationUnitOptions());
> CXUnsavedFile file;
> file.Filename = "main.cpp";
> file.Contents = DOCUMENT;
> file.Length = strlen(DOCUMENT);
> clang_reparseTranslationUnit(tu, 1, &file, clang_defaultEditingTranslationUnitOptions());
> return 0;
> }
>
> Output is:
> libclang: crash detected during reparsing
> Segmentation fault (core dumped)
>
> Am I doing something perverted or is this a bug?
>
> Oliver
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
More information about the cfe-dev
mailing list