Skip to content

Instantly share code, notes, and snippets.

@bstaletic
bstaletic / data
Last active May 18, 2021 09:15
Clangd segfault investigation
Content-Length: 1232
{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"textDocument":{"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"completion":{"completionItem":{"documentationFormat":["plaintext","markdown"]},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"documentSymbol":{"hierarchicalDocumentSymbolSupport":false,"labelSupport":false,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"hover":{"contentFormat":["plaintext","markdown"]},"signatureHelp":{"signatureInformation":{"documentationFormat":["plaintext","markdown"],"parameterInformation":{"labelOffsetSupport":true}}},"synchronization":{"didSave":true}},"workspace":{"applyEdit":true,"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"symbolKind":{"valueSet":[1,2,3,4,5,6,7,
diff --git a/cpp/ycm/CMakeLists.txt b/cpp/ycm/CMakeLists.txt
index a7d47bf7..168144cc 100644
--- a/cpp/ycm/CMakeLists.txt
+++ b/cpp/ycm/CMakeLists.txt
@@ -307,11 +307,27 @@ else()
message( FATAL_ERROR "Unknown compiler - C++17 filesystem library missing" )
endif()
+# Check if Abseil supports this environment
+file( WRITE ${CMAKE_CURRENT_BINARY_DIR}/main.cpp "#include <absl/base/policy_checks.h>\nint main() {}" )
SCRIPT /usr/share/vim/vim82/ftplugin/python.vim
Sourced 1 time
Total time: 0.000708
Self time: 0.000708
count total (s) self (s)
" Vim filetype plugin file
" Language: python
" Maintainer: Tom Picton <[email protected]>
" Previous Maintainer: James Sully <[email protected]>
------------------------------------------------------------------------------------------------------------------------
Benchmark Time CPU Iterations
------------------------------------------------------------------------------------------------------------------------
IdentifierCompleterFixture/CandidatesWithCommonPrefix/1/0 570 ns 569 ns 1233659
IdentifierCompleterFixture/CandidatesWithCommonPrefix/16/0 4160 ns 4157 ns 169346
IdentifierCompleterFixture/CandidatesWithCommonPrefix/256/0 80560 ns 80501 ns 8793
IdentifierCompleterFixture/CandidatesWithCommonPrefix/4096/0 883403 ns 882515 ns 784
IdentifierCompleterFixture/CandidatesWithCommonPrefix/65536/0 16329117 ns 16276601 ns 42
IdentifierCompleterFixture/CandidatesWithCommonPrefix_Bi
@bstaletic
bstaletic / valgrind-import-numpy.log
Last active January 31, 2021 17:28
Numpy leaks on import
==24972== Memcheck, a memory error detector
==24972== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==24972== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info
==24972== Command: python3.9-dbg -c import\ numpy;\ print(numpy.__version__)
==24972==
1.20.0
==24972==
==24972== HEAP SUMMARY:
==24972== in use at exit: 3,340,248 bytes in 20,455 blocks
==24972== total heap usage: 316,625 allocs, 296,170 frees, 47,680,096 bytes allocated
@bstaletic
bstaletic / YCM.log
Last active December 3, 2020 11:45
logs...
2020-12-03 12:43:29,886 - DEBUG - GET b'http://127.0.0.1:49813/ready' (None)
{'content-type': 'application/json', 'x-ycm-hmac': b'7V/oVwvrialI/7bgEjjDAsu1Ix7gYeJxgWG2kIEyaiU='}
2020-12-03 12:43:29,977 - DEBUG - RX: <Response [200]>
true
2020-12-03 12:43:29,978 - DEBUG - GET b'http://127.0.0.1:49813/signature_help_available' ({'subserver': 'cpp'})
{'content-type': 'application/json', 'x-ycm-hmac': b'tl3HNVpthje1kIGfOnJ0lfgmFtu7Un0EL3H7JtnJqLc='}
2020-12-03 12:43:30,058 - DEBUG - POST b'http://127.0.0.1:49813/event_notification'
{'content-type': 'application/json', 'x-ycm-hmac': b'r0oL36K60tWxZfFXGh3ZiGiRJIEDrzHP2NjJD2pYtd8='}
b'{"filepath": "/home/bstaletic/.vim/pack/bundle/start/YouCompleteMe/bar.cpp", "line_num": 1, "column_num": 1, "working_dir": "/home/bstaletic/.vim/pack/bundle/start/YouCompleteMe", "file_data": {"/home/bstaletic/.vim/pack/bundle/start/YouCompleteMe/bar.cpp": {"contents": "\\n", "filetypes": ["cpp"]}}, "ultisnips_snippets": [{"trigger": "ld", "description": ""}, {"trigger": "def", "descri
@bstaletic
bstaletic / YCM client logs
Created November 20, 2020 14:07
Example of C# logs
2020-11-20 15:04:48,082 - DEBUG - GET b'http://127.0.0.1:37387/ready' (None)
{'content-type': 'application/json', 'x-ycm-hmac': b'toH/c+m5V0zqogMQHt7DMb0xLcgbSErbDw64wIPBgrg='}
2020-11-20 15:04:48,236 - ERROR - HTTPConnectionPool(host='127.0.0.1', port=37387): Max retries exceeded with url: /ready (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fb7d979f280>: Failed to establish a new connection: [Errno 111] Connection refused'))
2020-11-20 15:04:48,336 - DEBUG - GET b'http://127.0.0.1:37387/ready' (None)
{'content-type': 'application/json', 'x-ycm-hmac': b'toH/c+m5V0zqogMQHt7DMb0xLcgbSErbDw64wIPBgrg='}
2020-11-20 15:04:48,338 - ERROR - HTTPConnectionPool(host='127.0.0.1', port=37387): Max retries exceeded with url: /ready (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fb7d979fac0>: Failed to establish a new connection: [Errno 111] Connection refused'))
2020-11-20 15:04:48,438 - DEBUG - GET b'http://127.0.0.1:37387/ready' (None)
{'content-type': 'a
# Maintainer: Chih-Hsuan Yen <[email protected]>
# Contributor: Alexander 'z33ky' Hirsch <[email protected]>
# The following contributors are from the vim-youcompleteme-git AUR package
# Contributor: Babken Vardanyan <483ken 4tgma1l
# Contributor: stykr
# Contributor: Svenstaro
# Contributor: KaiSforza
# Contributor: Simon Gomizelj <[email protected]>
# Contributor: Daniel Micay <[email protected]>
@bstaletic
bstaletic / helgrind-gil.log
Last active January 1, 2021 13:15
Pybind11 - valgrind errors
tests/test_gil_scoped.py::test_python_to_cpp_to_python_from_thread
==5578== ---Thread-Announcement------------------------------------------
==5578==
==5578== Thread #2 was created
==5578== at 0x4F7C282: clone (in /usr/lib/libc-2.32.so)
==5578== by 0x4D0F2D1: create_thread (in /usr/lib/libpthread-2.32.so)
==5578== by 0x4D10C10: pthread_create@@GLIBC_2.2.5 (in /usr/lib/libpthread-2.32.so)
==5578== by 0x4841687: pthread_create_WRK (hg_intercepts.c:425)
==5578== by 0x4ABA565: PyThread_start_new_thread (thread_pthread.h:284)
==5578== by 0x4B23BA8: thread_PyThread_start_new_thread (_threadmodule.c:1113)
@bstaletic
bstaletic / log
Created October 17, 2020 14:32
valgrind pybind11 possible leaks on module import
This file has been truncated, but you can view the full file.
==24609== Memcheck, a memory error detector
==24609== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==24609== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info
==24609== Command: python -c import\ pybind11_tests
==24609==
==24609==
==24609== HEAP SUMMARY:
==24609== in use at exit: 3,557,347 bytes in 21,989 blocks
==24609== total heap usage: 377,880 allocs, 355,891 frees, 70,253,870 bytes allocated
==24609==