root-project / cling

The cling C++ interpreter
Other
3.52k stars 269 forks source link

std::endl terminates output #300

Open Zekfad opened 5 years ago

Zekfad commented 5 years ago

Hello, I meet some bug, as title said. I used cling from 0.6 release, VS2017 for compiling. Here's example code which is "bugged": test.cpp:

#include <iostream>

int main(void)
{
    std::cout << std::endl;
    std::cout << "Hello World!\n";
    std::cout << std::endl;
    std::cout << "You will never see me too...\n";
    std::cout << std::endl;
    return 0;
}

int test(void) {
    return main();
}

Here's verbose output:

D:\Users\vorob\Desktop\cling\bin>cling.exe test.cpp -v
Adding library paths from 'LD_LIBRARY_PATH':
Adding library paths from 'PATH':
  ignoring nonexistent directory "C:\Program Files\nVidia CUDA\dev\bin"
  ignoring nonexistent directory "C:\Program Files\nVidia CUDA\dev\libnvvp"
  ignoring nonexistent directory "C:\Users\vorob\AppData\Local\atom\bin"
  ignoring nonexistent directory "D:\Program Files\nodejs\"
cling version 0.6
Environment 'VS150COMNTOOLS' not found.
Adding UniversalCRT SDK: 'C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt'
clang version 5.0.0 (http://root.cern.ch/git/clang.git 02c41d5edd15232b0b25ec1d842403552c2aceb4) (http://root.cern.ch/git/llvm.git e0b472e46eb5861570497c2b9efabf96f2d4a485)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir:
ignoring duplicate directory "C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt"
  as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
 D:\Users\vorob\Desktop\cling\bin\..\lib\clang\5.0.0\include
 D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\include
 C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt
 C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared
 C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um
 C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt
End of search list.
Adding runtime include paths:
  "O:/CLING/include;O:/CLING/src/tools/cling/include"
Added include paths:
  O:/CLING/include
  O:/CLING/src/tools/cling/include
Setting up system headers with clang:
ignoring nonexistent directory "O:/CLING/include"
ignoring duplicate directory "C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt"
  as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
 O:/CLING/src/tools/cling/include
 D:\Users\vorob\Desktop\cling\bin\..\lib\clang\5.0.0\include
 D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\include
 C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt
 C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared
 C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um
 C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt
End of search list.
#include "cling/Interpreter/RuntimeUniverse.h"
namespace cling { class Interpreter; namespace runtime { Interpreter* gCling=(Interpreter*)0x9bb7d8f810;}}
extern "C" int __cxa_atexit(void (*f)(void*), void*, void*) ;
#define __dso_handle ((void*)0x9bb7d8f810)
extern "C" int atexit(void(*f)())  { return __cxa_atexit((void(*)(void*))f, 0, __dso_handle); }
extern "C" int at_quick_exit(void(*f)())  { return __cxa_atexit((void(*)(void*))f, 0, __dso_handle); }
extern "C" __cdecl int (*__dllonexit(int (__cdecl *f)(void**, void**), void**, void**))(void**, void**) { __cxa_atexit((void(*)(void*))f, 0, __dso_handle); return f; }
extern "C" __cdecl int (*_onexit(int (__cdecl *f)()))() { __cxa_atexit((void(*)(void*))f, 0, __dso_handle); return f; }
Added include paths:
  .

Here's not (?) bugged code: test.cpp:

#include <iostream>

int main(void)
{
    std::cout << "\n";
    std::cout << "Hello World!\n";
    std::cout << "\n";
    std::cout << "You will never see me too...\n";
    std::cout << "\n";
    return 0;
}

int test(void) {
    return main();
}

Here's output:

D:\Users\vorob\Desktop\cling\bin>cling.exe test.cpp -v
Adding library paths from 'LD_LIBRARY_PATH':
Adding library paths from 'PATH':
  ignoring nonexistent directory "C:\Program Files\nVidia CUDA\dev\bin"
  ignoring nonexistent directory "C:\Program Files\nVidia CUDA\dev\libnvvp"
  ignoring nonexistent directory "C:\Users\vorob\AppData\Local\atom\bin"
  ignoring nonexistent directory "D:\Program Files\nodejs\"
cling version 0.6
Environment 'VS150COMNTOOLS' not found.
Adding UniversalCRT SDK: 'C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt'
clang version 5.0.0 (http://root.cern.ch/git/clang.git 02c41d5edd15232b0b25ec1d842403552c2aceb4) (http://root.cern.ch/git/llvm.git e0b472e46eb5861570497c2b9efabf96f2d4a485)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir:
ignoring duplicate directory "C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt"
  as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
 D:\Users\vorob\Desktop\cling\bin\..\lib\clang\5.0.0\include
 D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\include
 C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt
 C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared
 C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um
 C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt
End of search list.
Adding runtime include paths:
  "O:/CLING/include;O:/CLING/src/tools/cling/include"
Added include paths:
  O:/CLING/include
  O:/CLING/src/tools/cling/include
Setting up system headers with clang:
ignoring nonexistent directory "O:/CLING/include"
ignoring duplicate directory "C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt"
  as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
 O:/CLING/src/tools/cling/include
 D:\Users\vorob\Desktop\cling\bin\..\lib\clang\5.0.0\include
 D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\include
 C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt
 C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared
 C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um
 C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt
End of search list.
#include "cling/Interpreter/RuntimeUniverse.h"
namespace cling { class Interpreter; namespace runtime { Interpreter* gCling=(Interpreter*)0xe41378f7f0;}}
extern "C" int __cxa_atexit(void (*f)(void*), void*, void*) ;
#define __dso_handle ((void*)0xe41378f7f0)
extern "C" int atexit(void(*f)())  { return __cxa_atexit((void(*)(void*))f, 0, __dso_handle); }
extern "C" int at_quick_exit(void(*f)())  { return __cxa_atexit((void(*)(void*))f, 0, __dso_handle); }
extern "C" __cdecl int (*__dllonexit(int (__cdecl *f)(void**, void**), void**, void**))(void**, void**) { __cxa_atexit((void(*)(void*))f, 0, __dso_handle); return f; }
extern "C" __cdecl int (*_onexit(int (__cdecl *f)()))() { __cxa_atexit((void(*)(void*))f, 0, __dso_handle); return f; }
Added include paths:
  .

Hello World!

You will never see me too...

(int) 0
Axel-Naumann commented 5 years ago

@bellenot is that a known issue?

bellenot commented 5 years ago

Both work for me with cling master:

C:\Users\bellenot\rootdev>..\build\llvm\build\Debug\bin\cling.exe test.cpp -v
Adding library paths from 'LD_LIBRARY_PATH':
Adding library paths from 'PATH':
  ignoring nonexistent directory "C:\Python27\"
  ignoring nonexistent directory "C:\Python27\Scripts"
  ignoring nonexistent directory "C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\"
  ignoring nonexistent directory "C:\Users\bellenot\bin\gnuwin32\bin"
  ignoring nonexistent directory "C:\Program Files (x86)\Microsoft VS Code\bin"
cling version 0.7~dev
Using VCToolsInstallDir 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\'
Adding VisualStudio SDK: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\\include'
Adding Windows SDK: 'C:\Program Files (x86)\Windows Kits\10\include'
Adding UniversalCRT SDK: 'C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt'
clang version 5.0.0 (http://root.cern.ch/git/clang.git 02c41d5edd15232b0b25ec1d842403552c2aceb4) (http://root.cern.ch/git/llvm.git e0b472e46eb5861570497c2b9efabf96f2d4a485)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: ..\build\llvm\build\Debug\bin
ignoring duplicate directory "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\\include"
  as it is a non-system directory that duplicates a system directory
ignoring duplicate directory "C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt"
  as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
C:\Program Files (x86)\Windows Kits\10\include
C:\Users\bellenot\build\llvm\build\Debug\bin\..\lib\clang\5.0.0\include
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\ATLMFC\include
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\\include
C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt
End of search list.
Adding runtime include paths:
  "C:/Program Files (x86)/LLVM/include;C:/Users/bellenot/build/llvm/src/tools/cling/include"
Added include paths:
  C:/Program Files (x86)/LLVM/include
  C:/Users/bellenot/build/llvm/src/tools/cling/include
Setting up system headers with clang:
ignoring duplicate directory "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\\include"
  as it is a non-system directory that duplicates a system directory
ignoring duplicate directory "C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt"
  as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
C:\Program Files (x86)\Windows Kits\10\include
C:/Program Files (x86)/LLVM/include
C:/Users/bellenot/build/llvm/src/tools/cling/include
C:\Users\bellenot\build\llvm\build\Debug\bin\..\lib\clang\5.0.0\include
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\ATLMFC\include
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\\include
C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt
End of search list.
#include "cling/Interpreter/RuntimeUniverse.h"
namespace cling { class Interpreter; namespace runtime { Interpreter* gCling=(Interpreter*)0x4adcf8f2f0;}}
extern "C" int __cxa_atexit(void (*f)(void*), void*, void*) ;
#define __dso_handle ((void*)0x4adcf8f2f0)
extern "C" int atexit(void(*f)())  { return __cxa_atexit((void(*)(void*))f, 0, __dso_handle); }
extern "C" int at_quick_exit(void(*f)())  { return __cxa_atexit((void(*)(void*))f, 0, __dso_handle); }
extern "C" __cdecl int (*__dllonexit(int (__cdecl *f)(void**, void**), void**, void**))(void**, void**) { __cxa_atexit((void(*)(void*))f, 0, __dso_handle); return f; }
extern "C" __cdecl int (*_onexit(int (__cdecl *f)()))() { __cxa_atexit((void(*)(void*))f, 0, __dso_handle); return f; }
Added include paths:
  .

Hello World!

You will never see me too...

(int) 0

C:\Users\bellenot\rootdev>..\build\llvm\build\Debug\bin\cling.exe test.cpp -v
Adding library paths from 'LD_LIBRARY_PATH':
Adding library paths from 'PATH':
  ignoring nonexistent directory "C:\Python27\"
  ignoring nonexistent directory "C:\Python27\Scripts"
  ignoring nonexistent directory "C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\"
  ignoring nonexistent directory "C:\Users\bellenot\bin\gnuwin32\bin"
  ignoring nonexistent directory "C:\Program Files (x86)\Microsoft VS Code\bin"
cling version 0.7~dev
Using VCToolsInstallDir 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\'
Adding VisualStudio SDK: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\\include'
Adding Windows SDK: 'C:\Program Files (x86)\Windows Kits\10\include'
Adding UniversalCRT SDK: 'C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt'
clang version 5.0.0 (http://root.cern.ch/git/clang.git 02c41d5edd15232b0b25ec1d842403552c2aceb4) (http://root.cern.ch/git/llvm.git e0b472e46eb5861570497c2b9efabf96f2d4a485)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: ..\build\llvm\build\Debug\bin
ignoring duplicate directory "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\\include"
  as it is a non-system directory that duplicates a system directory
ignoring duplicate directory "C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt"
  as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
C:\Program Files (x86)\Windows Kits\10\include
C:\Users\bellenot\build\llvm\build\Debug\bin\..\lib\clang\5.0.0\include
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\ATLMFC\include
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\\include
C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt
End of search list.
Adding runtime include paths:
  "C:/Program Files (x86)/LLVM/include;C:/Users/bellenot/build/llvm/src/tools/cling/include"
Added include paths:
  C:/Program Files (x86)/LLVM/include
  C:/Users/bellenot/build/llvm/src/tools/cling/include
Setting up system headers with clang:
ignoring duplicate directory "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\\include"
 as it is a non-system directory that duplicates a system directory
ignoring duplicate directory "C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt"
  as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
C:\Program Files (x86)\Windows Kits\10\include
C:/Program Files (x86)/LLVM/include
C:/Users/bellenot/build/llvm/src/tools/cling/include
C:\Users\bellenot\build\llvm\build\Debug\bin\..\lib\clang\5.0.0\include
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\ATLMFC\include
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\\include
C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt
End of search list.
#include "cling/Interpreter/RuntimeUniverse.h"
namespace cling { class Interpreter; namespace runtime { Interpreter* gCling=(Interpreter*)0x8ae818f4e0;}}
extern "C" int __cxa_atexit(void (*f)(void*), void*, void*) ;
#define __dso_handle ((void*)0x8ae818f4e0)
extern "C" int atexit(void(*f)())  { return __cxa_atexit((void(*)(void*))f, 0, __dso_handle); }
extern "C" int at_quick_exit(void(*f)())  { return __cxa_atexit((void(*)(void*))f, 0, __dso_handle); }
extern "C" __cdecl int (*__dllonexit(int (__cdecl *f)(void**, void**), void**, void**))(void**, void**) { __cxa_atexit((void(*)(void*))f, 0, __dso_handle); return f; }
extern "C" __cdecl int (*_onexit(int (__cdecl *f)()))() { __cxa_atexit((void(*)(void*))f, 0, __dso_handle); return f; }
Added include paths:
  .

Hello World!

You will never see me too...

(int) 0

C:\Users\bellenot\rootdev>
Zekfad commented 5 years ago

I will try to recompile from latest master and check it again.

Zekfad commented 5 years ago

Hello, I recompiled cling from the scratch. (I mean, I full wiped my local data and cloned everything again). And I still have the same issue:

Screenshot ![image](https://user-images.githubusercontent.com/8970959/65457455-42bfdc80-de54-11e9-9210-e3ab10c8d2b6.png)
Log ``` O:\CLING\src\build\Release\bin>cling.exe D:\Users\vorob\Desktop\cling\bin\test.cpp -v Adding library paths from 'LD_LIBRARY_PATH': Adding library paths from 'PATH': ignoring nonexistent directory "C:\Program Files\nVidia CUDA\dev\bin" ignoring nonexistent directory "C:\Program Files\nVidia CUDA\dev\libnvvp" ignoring nonexistent directory "C:\Users\vorob\AppData\Local\atom\bin" ignoring nonexistent directory "D:\Program Files\nodejs\" cling version 0.7~dev Environment 'VS150COMNTOOLS' not found. Adding UniversalCRT SDK: 'C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt' clang version 5.0.0 (http://root.cern.ch/git/clang.git 02c41d5edd15232b0b25ec1d842403552c2aceb4) (http://root.cern.ch/git/llvm.git e0b472e46eb5861570497c2b9efabf96f2d4a485) Target: x86_64-pc-windows-msvc Thread model: posix InstalledDir: ignoring duplicate directory "C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt" as it is a non-system directory that duplicates a system directory #include "..." search starts here: #include <...> search starts here: O:\CLING\src\build\Release\bin\..\lib\clang\5.0.0\include D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\include C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt End of search list. Adding runtime include paths: "O:/CLING/bin/include;O:/CLING/src/tools/cling/include" Added include paths: O:/CLING/bin/include O:/CLING/src/tools/cling/include Setting up system headers with clang: ignoring nonexistent directory "O:/CLING/bin/include" ignoring duplicate directory "C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt" as it is a non-system directory that duplicates a system directory #include "..." search starts here: #include <...> search starts here: O:/CLING/src/tools/cling/include O:\CLING\src\build\Release\bin\..\lib\clang\5.0.0\include D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\include C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt End of search list. #include "cling/Interpreter/RuntimeUniverse.h" namespace cling { class Interpreter; namespace runtime { Interpreter* gCling=(Interpreter*)0x690fd8f7e0;}} extern "C" int __cxa_atexit(void (*f)(void*), void*, void*) ; #define __dso_handle ((void*)0x690fd8f7e0) extern "C" int atexit(void(*f)()) { return __cxa_atexit((void(*)(void*))f, 0, __dso_handle); } extern "C" int at_quick_exit(void(*f)()) { return __cxa_atexit((void(*)(void*))f, 0, __dso_handle); } extern "C" __cdecl int (*__dllonexit(int (__cdecl *f)(void**, void**), void**, void**))(void**, void**) { __cxa_atexit((void(*)(void*))f, 0, __dso_handle); return f; } extern "C" __cdecl int (*_onexit(int (__cdecl *f)()))() { __cxa_atexit((void(*)(void*))f, 0, __dso_handle); return f; } Added include paths: . O:\CLING\src\build\Release\bin> ```

File still the same. I can share my binaries, if necessary.

SylvainCorlay commented 4 years ago

We have the same issue with the cling conda package on windows (which is built with MSVC 2015).

std::endl interupts the cling interpreter on windows.

endl
SylvainCorlay commented 4 years ago

More specifically, std::cout.widen('\n'); kills the interpreter on windows.

(or any call to widen or narrow, but the issue is not with std::flush.)

widen
SylvainCorlay commented 4 years ago

More specifically, std::cout.widen('\n'); kills the interpreter on windows.

@bellenot do you have any clue what the issue may be here?

SylvainCorlay commented 4 years ago

Diving a bit more into this

In cling:

#include <iostream>
auto locale = std::cout.getloc();
std::use_facet< std::ctype<char>>(locale);  // <---- crashes at this point
SylvainCorlay commented 4 years ago

More generally, auto ct = new std::ctype<char> crashes the interpreter.

ctype

The two non-template bases of std::ctype (facet and ctype_base) can be instantiated without error.

SylvainCorlay commented 4 years ago

To reproduce

bellenot commented 4 years ago

So here is the result of my latest tests (cling master of today, x64, debug build):

C:\Users\bellenot\rootdev>..\build\llvm\build\Debug\bin\cling.exe test_cling.cpp -v
Adding library paths from 'LD_LIBRARY_PATH':
Adding library paths from 'PATH':
  ignoring nonexistent directory "C:\Python27\"
  ignoring nonexistent directory "C:\Python27\Scripts"
  ignoring nonexistent directory "C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\"
  ignoring nonexistent directory "C:\Users\bellenot\bin\gnuwin32\bin"
  ignoring nonexistent directory "C:\Program Files (x86)\Microsoft VS Code\bin"
cling version 0.7~dev
Using VCToolsInstallDir 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\'
Adding VisualStudio SDK: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\\include'
Adding Windows SDK: 'C:\Program Files (x86)\Windows Kits\10\include'
Adding UniversalCRT SDK: 'C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt'
clang version 5.0.0 (http://root.cern.ch/git/clang.git c698bd59e299f9418c416a08f8ec3bf4c24a314b) (http://root.cern.ch/git/llvm.git e0b472e46eb5861570497c2b9efabf96f2d4a485)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: ..\build\llvm\build\Debug\bin
ignoring duplicate directory "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\\include"
  as it is a non-system directory that duplicates a system directory
ignoring duplicate directory "C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt"
  as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
C:\Program Files (x86)\Windows Kits\10\include
C:\Users\bellenot\build\llvm\build\Debug\bin\..\lib\clang\5.0.0\include
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\ATLMFC\include
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\\include
C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.2\include\um
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt
End of search list.
Adding runtime include paths:
  "C:/Program Files (x86)/LLVM/include;C:/Users/bellenot/build/llvm/src/tools/cling/include"
Added include paths:
  C:/Program Files (x86)/LLVM/include
  C:/Users/bellenot/build/llvm/src/tools/cling/include
Setting up system headers with clang:
ignoring duplicate directory "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\\include"
  as it is a non-system directory that duplicates a system directory
ignoring duplicate directory "C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt"
  as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
C:\Program Files (x86)\Windows Kits\10\include
C:/Program Files (x86)/LLVM/include
C:/Users/bellenot/build/llvm/src/tools/cling/include
C:\Users\bellenot\build\llvm\build\Debug\bin\..\lib\clang\5.0.0\include
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\ATLMFC\include
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\\include
C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.2\include\um
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt
End of search list.
#include "cling/Interpreter/RuntimeUniverse.h"
namespace cling { class Interpreter; namespace runtime { Interpreter* gCling=(Interpreter*)0x62a898f750;}}
extern "C" int __cxa_atexit(void (*f)(void*), void*, void*) ;
#define __dso_handle ((void*)0x62a898f750)
extern "C" int atexit(void(*f)())  { return __cxa_atexit((void(*)(void*))f, 0, __dso_handle); }
extern "C" int at_quick_exit(void(*f)())  { return __cxa_atexit((void(*)(void*))f, 0, __dso_handle); }
extern "C" __cdecl int (*__dllonexit(int (__cdecl *f)(void**, void**), void**, void**))(void**, void**) { __cxa_atexit((void(*)(void*))f, 0, __dso_handle); return f; }
extern "C" __cdecl int (*_onexit(int (__cdecl *f)()))() { __cxa_atexit((void(*)(void*))f, 0, __dso_handle); return f; }
Added include paths:
  .

Hello World!

You will never see me too...

(int) 0

C:\Users\bellenot\rootdev>
C:\Users\bellenot\rootdev>..\build\llvm\build\Debug\bin\cling.exe

****************** CLING ******************
* Type C++ code and press enter to run it *
*             Type .q to exit             *
*******************************************
[cling]$ #include <iostream>
[cling]$ std::cout << "hello" << std::endl;
hello
[cling]$
C:\Users\bellenot\rootdev>..\build\llvm\build\Debug\bin\cling.exe

****************** CLING ******************
* Type C++ code and press enter to run it *
*             Type .q to exit             *
*******************************************
[cling]$ #include <iostream>
[cling]$ std::cout << std::endl;

[cling]$
C:\Users\bellenot\rootdev>..\build\llvm\build\Debug\bin\cling.exe

****************** CLING ******************
* Type C++ code and press enter to run it *
*             Type .q to exit             *
*******************************************
[cling]$ #include <iostream>
[cling]$ auto ct = new std::ctype<char>
(std::ctype<char> *) @0xa8f8f8e2f0
[cling]$

The only issue I see is when typing .q, it generates a crash dump file (I'll try to debug this) I'll try also to build in Release mode to see if it makes any difference

SylvainCorlay commented 4 years ago

@bellenot thanks for looking into it!

Did you try out the cling build from conda?

Note that we build releases only, and this is with version 0.6.

bellenot commented 4 years ago

@bellenot thanks for looking into it!

You're welcome

Did you try out the cling build from conda?

Nope, not yet (I do too many things in parallel)...

bellenot commented 4 years ago

Here is what I got:

C:\Users\bellenot>AppData\Local\Continuum\miniconda3\condabin\conda install cling -c conda-forge
Collecting package metadata (current_repodata.json): done
Solving environment: done

==> WARNING: A newer version of conda exists. <==
  current version: 4.7.12
  latest version: 4.8.1

Please update conda by running

    $ conda update -n base -c defaults conda

## Package Plan ##

  environment location: C:\Users\bellenot\AppData\Local\Continuum\miniconda3

  added / updated specs:
    - cling

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    ca-certificates-2019.11.28 |       hecc5488_0         182 KB  conda-forge
    certifi-2019.11.28         |           py37_0         148 KB  conda-forge
    clang_variant-1.0          |       cling_v0.6           9 KB  conda-forge
    clangdev-5.0.0             |    hf2afde9_1006       170.0 MB  conda-forge
    cling-0.6                  |       h1a24767_1        38.1 MB  conda-forge
    conda-4.8.2                |           py37_0         3.0 MB  conda-forge
    openssl-1.1.1d             |       hfa6e2cd_0         4.7 MB  conda-forge
    zlib-1.2.11                |    h2fa13f4_1006         236 KB  conda-forge
    ------------------------------------------------------------
                                           Total:       216.4 MB

The following NEW packages will be INSTALLED:

  clang_variant      conda-forge/win-64::clang_variant-1.0-cling_v0.6
  clangdev           conda-forge/win-64::clangdev-5.0.0-hf2afde9_1006
  cling              conda-forge/win-64::cling-0.6-h1a24767_1
  zlib               conda-forge/win-64::zlib-1.2.11-h2fa13f4_1006

The following packages will be UPDATED:

  ca-certificates    pkgs/main::ca-certificates-2019.10.16~ --> conda-forge::ca-certificates-2019.11.28-hecc5488_0
  certifi               pkgs/main::certifi-2019.9.11-py37_0 --> conda-forge::certifi-2019.11.28-py37_0
  conda                      pkgs/main::conda-4.7.12-py37_0 --> conda-forge::conda-4.8.2-py37_0

The following packages will be SUPERSEDED by a higher-priority channel:

  openssl              pkgs/main::openssl-1.1.1d-he774522_3 --> conda-forge::openssl-1.1.1d-hfa6e2cd_0

Proceed ([y]/n)? y

Downloading and Extracting Packages
cling-0.6            | 38.1 MB   | ############################################################################ | 100%
openssl-1.1.1d       | 4.7 MB    | ############################################################################ | 100%
zlib-1.2.11          | 236 KB    | ############################################################################ | 100%
certifi-2019.11.28   | 148 KB    | ############################################################################ | 100%
ca-certificates-2019 | 182 KB    | ############################################################################ | 100%
clangdev-5.0.0       | 170.0 MB  | ############################################################################ | 100%
conda-4.8.2          | 3.0 MB    | ############################################################################ | 100%
clang_variant-1.0    | 9 KB      | ############################################################################ | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

C:\Users\bellenot>cling
'cling' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\bellenot>AppData\Local\Continuum\miniconda3\Library\bin\cling

****************** CLING ******************
* Type C++ code and press enter to run it *
*             Type .q to exit             *
*******************************************
[cling]$ #include <iostream>
[cling]$ auto ct = new std::ctype<char>
(std::ctype<char> *) @0x73a318eb68
[cling]$ .q
Wrote crash dump file "C:\Users\bellenot\AppData\Local\Temp\cling.exe-1e2303.dmp"
0x00007FF6E5C797D8 (0x00000199E85F8920 0x00000199E85FA9A8 0x00000199E85F8910 0x0000000000000007), ?grow@?$SmallVectorTemplateBase@VTemplateArgument@clang@@$0A@@llvm@@IEAAX_K@Z() + 0x19F18 bytes(s)
0x00007FF6E5CCBC1A (0x00000C9209DF2D32 0x0000000000000000 0x00000073A318F9A0 0x00007FFCACAC0F54), ??__F_Static@?1???$_Immortalize@V_System_error_category@std@@@std@@YAAEAV_System_error_category@0@XZ@YAXXZ() + 0x980A bytes(s)
0x00007FFCACAC3E26 (0x00000073A318F900 0x00000073A318F928 0x00000073A318F9C0 0x00007FFCACB9C130), _execute_onexit_table() + 0x156 bytes(s)
0x00007FFCACAC3D4B (0x00000073A318F9A8 0x00007FFCACB9C130 0x0000000000000000 0x00000073A318F918), _execute_onexit_table() + 0x7B bytes(s)
0x00007FFCACAC3D04 (0x00007FFCACB9BDE0 0x00007FFC00000002 0x0000000000000002 0x00000073A318F910), _execute_onexit_table() + 0x34 bytes(s)
0x00007FFCACAD000E (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), exit() + 0x13E bytes(s)
0x00007FFCACACFF9B (0x0000000000000000 0x0000000000000000 0x00007FFCACB9BDB8 0x00000073A318F9A0), exit() + 0xCB bytes(s)
0x00007FFCACACFF3E (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), exit() + 0x6E bytes(s)
0x00007FF6E5C7A6AF (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), ??_U@YAPEAX_K@Z() + 0x4BB bytes(s)
0x00007FFCADBE7974 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), BaseThreadInitThunk() + 0x14 bytes(s)
0x00007FFCB071A271 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), RtlUserThreadStart() + 0x21 bytes(s)

C:\Users\bellenot>AppData\Local\Continuum\miniconda3\Library\bin\cling

****************** CLING ******************
* Type C++ code and press enter to run it *
*             Type .q to exit             *
*******************************************
[cling]$ #include <iostream>
[cling]$ std::cout << "hello" << std::endl;
hello
[cling]$ .q
Wrote crash dump file "C:\Users\bellenot\AppData\Local\Temp\cling.exe-369e9a.dmp"
0x00007FF6E5C797D8 (0x000001FE31624D80 0x000001FE31626E08 0x000001FE31624D70 0x000000040000010D), ?grow@?$SmallVectorTemplateBase@VTemplateArgument@clang@@$0A@@llvm@@IEAAX_K@Z() + 0x19F18 bytes(s)
0x00007FF6E5CCBC1A (0x00008A6A08C1C6D5 0x0000000000000000 0x00000025C7B8FA80 0x00007FFCACAC0F54), ??__F_Static@?1???$_Immortalize@V_System_error_category@std@@@std@@YAAEAV_System_error_category@0@XZ@YAXXZ() + 0x980A bytes(s)
0x00007FFCACAC3E26 (0x00000025C7B8FA00 0x00000025C7B8FA08 0x00000025C7B8FAA0 0x00007FFCACB9C130), _execute_onexit_table() + 0x156 bytes(s)
0x00007FFCACAC3D4B (0x00000025C7B8FA88 0x00007FFCACB9C130 0x0000000000000000 0x00000025C7B8F9F8), _execute_onexit_table() + 0x7B bytes(s)
0x00007FFCACAC3D04 (0x00007FFCACB9BDE0 0x00007FFC00000002 0x0000000000000002 0x00000025C7B8F9F0), _execute_onexit_table() + 0x34 bytes(s)
0x00007FFCACAD000E (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), exit() + 0x13E bytes(s)
0x00007FFCACACFF9B (0x0000000000000000 0x0000000000000000 0x00007FFCACB9BDB8 0x00000025C7B8FA80), exit() + 0xCB bytes(s)
0x00007FFCACACFF3E (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), exit() + 0x6E bytes(s)
0x00007FF6E5C7A6AF (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), ??_U@YAPEAX_K@Z() + 0x4BB bytes(s)
0x00007FFCADBE7974 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), BaseThreadInitThunk() + 0x14 bytes(s)
0x00007FFCB071A271 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), RtlUserThreadStart() + 0x21 bytes(s)

C:\Users\bellenot>

As you can see, it seems to work, even if there is an issue when quitting cling, I'll try to debug it.

SylvainCorlay commented 4 years ago

Nope, not yet (I do too many things in parallel)...

No problem, we are all very over-subscribed.

FYI, here is the batch file used to produce the recipe. I figured you may see that we should change some compilation flag or something like this.

set "CXXFLAGS= -MD"

mkdir build
cd build

cmake -G "Ninja" ^
      -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
      -DCMAKE_BUILD_TYPE=Release ^
      -DLIBCLING_BUILD_STATIC=ON ^
      %SRC_DIR%

if errorlevel 1 exit 1

ninja -j%CPU_COUNT%
if errorlevel 1 exit 1

ninja install
if errorlevel 1 exit 1
bellenot commented 4 years ago

OK, thanks. I never tried to build with ninja... I will try when I have some time

SylvainCorlay commented 4 years ago

OK, thanks. I never tried to build with ninja... I will try when I have some time

Do you think ninja may be the culprit? I use it for most windows recipes and never had any problem.

bellenot commented 4 years ago

OK, thanks. I never tried to build with ninja... I will try when I have some time

Do you think ninja may be the culprit? I use it for most windows recipes and never had any problem.

No idea, I keep you posted

SylvainCorlay commented 4 years ago

No idea, I keep you posted

Let me know if you have any clue for the sort of thing that we should look for!

SylvainCorlay commented 4 years ago

@bellenot FYI, the error level of cling with that failure is -1073741819.

SylvainCorlay commented 4 years ago

cc @chrisburr. By any chance, do you have any idea what the issue may be?

jbsolomon commented 4 years ago

I'm also affected by the std::endl / auto ct = new std::ctype<char> bug. I built using:

SylvainCorlay commented 4 years ago

What is weird is that @bellenot is not affected while using the same build artefact as us (which is a conda package), which means that there is something in his local setup that fixes it.

bellenot commented 4 years ago

I'm also affected by the std::endl / auto ct = new std::ctype<char> bug. I built using:

  • VS 2019 Release (VS 2015 build tools and CMake generator, Windows 8.1 SDK)

Could you try to use the Windows 10 SDK?

SylvainCorlay commented 4 years ago

@bellenot what is weird is that the cling conda package works for you while it produces that error for us and on our CI.

I am curious what the dependency walker says in your case: do you have a different PATH from us making it so that other system libraries are loaded? Do you have other installations of cling or its dependencies that it is picking up at runtime?

jbsolomon commented 4 years ago

I'm also affected by the std::endl / auto ct = new std::ctype<char> bug. I built using:

  • VS 2019 Release (VS 2015 build tools and CMake generator, Windows 8.1 SDK)

Could you try to use the Windows 10 SDK?

@bellenot -- IIRC I was only able to build successfully with the restrictions mentioned. I already nuked the build tree and it took me all day to complete the build; maybe if I have some time this weekend I can take another look.

SylvainCorlay commented 4 years ago

The crash occurs with _BEGIN_LOCINFO(_Lobj) / _END_LOCINFO() pair in the std::ctype constructor in the xlocale header (including some printf, we see that _END_LOCINFO crashes.

bellenot commented 4 years ago

@bellenot what is weird is that the cling conda package works for you while it produces that error for us and on our CI.

I am curious what the dependency walker says in your case: do you have a different PATH from us making it so that other system libraries are loaded? Do you have other installations of cling or its dependencies that it is picking up at runtime?

Sorry, but I will have to set-up a new Virtual machine, I was trying that on a computer in my office, but now I'm working from home... That will take some time.

bellenot commented 4 years ago

@jbsolomon don't worry, as I said, I'll set-up a new virtual machine, we'll see how it goes (but I will need time...)

SylvainCorlay commented 4 years ago

Sorry, but I will have to set-up a new Virtual machine, I was trying that on a computer in my office, but now I'm working from home... That will take some time.

Thanks @bellenot I just come back to this issue every once in a while. Trying to narrow it down so that we have a workaround at least.

SylvainCorlay commented 4 years ago

printf statements in the xlocale internal MSVC header:

xlocale

Result in cling:

cling

bellenot commented 4 years ago

printf statements in the xlocale internal MSVC header:

can you give the full path?

SylvainCorlay commented 4 years ago

c/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include

bellenot commented 4 years ago

OK, thanks.

SylvainCorlay commented 4 years ago

Diving a bit more into this: The crash seems to occur at the closing of the _END_LOCINFO scope (in yvals.h)

  #define _BEGIN_LOCINFO(_VarName) \
        { \
                _Locinfo _VarName;

  #define _END_LOCINFO() \
        }

but not in the destructor of _Locinfo which appears to complete successfully.

SylvainCorlay commented 4 years ago

Maybe this is something the STL folks at Microsoft would have a clue about. I have gone beyond my windows-fu. cc @StephanTLavavej.

StephanTLavavej commented 4 years ago

Haven’t seen an issue like this before. Can you reduce it to a self-contained test case?

SylvainCorlay commented 4 years ago

Haven’t seen an issue like this before. Can you reduce it to a self-contained test case?

Thanks for dropping by @StephanTLavavej

The easiest way to reproduce is to install cling from conda-forge.

The crash of std::endl is not due to std::flush but to the call of widen on the newline character.

Axel-Naumann commented 4 years ago

I can think of two possible reasons, and they motivate a course of action:

The former will most likely be fixed by the (ongoing) llvm upgrade. If that doesn't help we will debug the latter.

SylvainCorlay commented 4 years ago

I would bet on the latter (issues with _Locinfo_[ctor|dtor]) because the symptoms are different on @bellenot's setup which may mean that he has a slightly different version of some runtime on his machine, but we have this issue on all our setups and CI.

StephanTLavavej commented 4 years ago

Oh, I see - the issue happens when you interpret MSVC's STL with cling (versus when cling itself is compiled). I'm afraid I have no experience with this scenario (we test MSVC's STL with Clang but not cling).

SylvainCorlay commented 4 years ago

Oh, I see - the issue happens when you interpret MSVC's STL with cling (versus when cling itself is compiled). I'm afraid I have no experience with this scenario (we test MSVC's STL with Clang but not cling).

Yep, although cling literally makes use of clang. I really think that there is an issue with the runtime being loaded and not with the STL interpretation.

SylvainCorlay commented 4 years ago

Oh, I see - the issue happens when you interpret MSVC's STL with cling (versus when cling itself is compiled). I'm afraid I have no experience with this scenario (we test MSVC's STL with Clang but not cling).

@StephanTLavavej and is there any known issue with clang interpretting MSVC's STL from Visual 2015 in that regard?

StephanTLavavej commented 4 years ago

VS 2015 feels like it was released in the pre-Cambrian era. I believe we supported Clang as a first-class citizen back then, with no extremely significant issues (including crashes in iostreams), although I'd feel more confident saying that about VS 2015 Update 3. We have fixed non-conformance over time to make Clang happier.

Seriously though, users should strongly consider upgrading to the latest version of VS 2019.

SylvainCorlay commented 4 years ago

We are still seeing this issue with cling 0.7, which is now built with VS2017 unfortunately (conda-forge moved to VS2017).

bellenot commented 4 years ago

VS 2017 is too old, many bugs have been fixed in Visual Studio since then, so it's maybe the reason

Keithcat1 commented 3 years ago

I appear to also be having this problem. My self-built instance of Cling dies if I do type these commands into the interpretor (it is on my home computer which I don't have access to right now).

include

int main() { printf("Hello\n"); } main() I built Cling 0.9, LLVM / Clang 9.0.1, using VS2019, Windows 10

bellenot commented 3 years ago

Hi, good (sort of) news: we can reproduce the problem. We will try to find the source of it (might be in Clang).

Keithcat1 commented 3 years ago

I did a statically linked build of cling with the static /MT release of the MSVC runtime and it still happens. This does not seem to happen with cppyy, which also uses cling. If it's a problem in clang, can it be fixed by just upgrading to LLVM 12?

On 6/23/21, Bertrand Bellenot @.***> wrote:

Hi, good (sort of) news: we can reproduce the problem. We will try to find the source of it (might be in Clang).

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/root-project/cling/issues/300#issuecomment-866594864

bellenot commented 3 years ago

AFAIK, the plan is to upgrade to LLVM 13 (and I have no time to investigate that right now)