[Switching to Thread 0x7fffed90e6c0 (LWP 7581)]
0x00007ffff4f0fc70 in _XSend () from /usr/lib64/libX11.so.6
(gdb) bt
#0 0x00007ffff4f0fc70 in _XSend () at /usr/lib64/libX11.so.6
#1 0x00007ffff4f0600a in XQueryExtension () at /usr/lib64/libX11.so.6
#2 0x00007ffff4ef96f2 in XInitExtension () at /usr/lib64/libX11.so.6
#3 0x00007ffff4ec536d in XextAddDisplay () at /usr/lib64/libXext.so.6
#4 0x00007fffedfc9e6f in () at /usr/lib64/libGLX_nvidia.so.0
#5 0x00007fffedfeb665 in () at /usr/lib64/libGLX_nvidia.so.0
#6 0x00007fffded4d499 in () at /usr/lib64/libnvidia-glcore.so.525.116.03
#7 0x00007fffded4b86c in () at /usr/lib64/libnvidia-glcore.so.525.116.03
#8 0x00007fffded4cf9f in () at /usr/lib64/libnvidia-glcore.so.525.116.03
#9 0x00007fffded3f7fc in () at /usr/lib64/libnvidia-glcore.so.525.116.03
#10 0x00007fffded3fdfe in () at /usr/lib64/libnvidia-glcore.so.525.116.03
#11 0x00007fffded3ffc1 in () at /usr/lib64/libnvidia-glcore.so.525.116.03
#12 0x00007fffedfea7bc in () at /usr/lib64/libGLX_nvidia.so.0
#13 0x00005555557490b5 in CCommandProcessorFragment_Vulkan::DestroySwapChain(bool) (ForceDestroy=true, this=0x555555c7a630) at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:4224
#14 CCommandProcessorFragment_Vulkan::DestroySwapChain(bool) (ForceDestroy=true, this=0x555555c7a630) at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:4220
#15 CCommandProcessorFragment_Vulkan::CleanupVulkanSwapChain(bool) (this=0x555555c7a630, ForceSwapChainDestruct=ForceSwapChainDestruct@entry=true)
at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:5451
#16 0x000055555574eb64 in CCommandProcessorFragment_Vulkan::CleanupVulkan<true>() (this=0x555555c7a630) at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:5462
#17 0x000055555575ee90 in CCommandProcessorFragment_Vulkan::Cmd_Shutdown(CCommandProcessorFragment_GLBase::SCommand_Shutdown const*) (pCommand=0x555556850f50, this=0x555555c7a630)
at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:6649
#18 CCommandProcessorFragment_Vulkan::RunCommand(CCommandBuffer::SCommand const*) (this=0x555555c7a630, pBaseCommand=0x555556850f50)
at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:6529
#19 0x00005555557672d6 in CCommandProcessor_SDL_GL::RunBuffer(CCommandBuffer*) (this=0x555555c7c580, pBuffer=<optimized out>) at /home/edgar/data/ddnet/src/engine/client/backend_sdl.cpp:335
#20 0x0000555555763186 in CGraphicsBackend_Threaded::ThreadFunc(void*) (pUser=pUser@entry=0x555555ad02a0) at /home/edgar/data/ddnet/src/engine/client/backend_sdl.cpp:63
#21 0x00005555556f4de7 in thread_run(void*) (user=<optimized out>) at /home/edgar/data/ddnet/src/base/system.cpp:764
#22 0x00007ffff53efaa3 in () at /lib64/libc.so.6
#23 0x00007ffff5471b5c in () at /lib64/libc.so.6
python3 serialize.py --version 0.7 raw/teeworlds-0.7.5.py > spec/teeworlds-0.7.5.json
[Switching to Thread 0x7fffed90e6c0 (LWP 7581)]
0x00007ffff4f0fc70 in _XSend () from /usr/lib64/libX11.so.6
(gdb) bt
#0 0x00007ffff4f0fc70 in _XSend () at /usr/lib64/libX11.so.6
#1 0x00007ffff4f0600a in XQueryExtension () at /usr/lib64/libX11.so.6
#2 0x00007ffff4ef96f2 in XInitExtension () at /usr/lib64/libX11.so.6
#3 0x00007ffff4ec536d in XextAddDisplay () at /usr/lib64/libXext.so.6
#4 0x00007fffedfc9e6f in () at /usr/lib64/libGLX_nvidia.so.0
#5 0x00007fffedfeb665 in () at /usr/lib64/libGLX_nvidia.so.0
#6 0x00007fffded4d499 in () at /usr/lib64/libnvidia-glcore.so.525.116.03
#7 0x00007fffded4b86c in () at /usr/lib64/libnvidia-glcore.so.525.116.03
#8 0x00007fffded4cf9f in () at /usr/lib64/libnvidia-glcore.so.525.116.03
#9 0x00007fffded3f7fc in () at /usr/lib64/libnvidia-glcore.so.525.116.03
#10 0x00007fffded3fdfe in () at /usr/lib64/libnvidia-glcore.so.525.116.03
#11 0x00007fffded3ffc1 in () at /usr/lib64/libnvidia-glcore.so.525.116.03
#12 0x00007fffedfea7bc in () at /usr/lib64/libGLX_nvidia.so.0
#13 0x00005555557490b5 in CCommandProcessorFragment_Vulkan::DestroySwapChain(bool) (ForceDestroy=true, this=0x555555c7a630) at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:4224
#14 CCommandProcessorFragment_Vulkan::DestroySwapChain(bool) (ForceDestroy=true, this=0x555555c7a630) at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:4220
#15 CCommandProcessorFragment_Vulkan::CleanupVulkanSwapChain(bool) (this=0x555555c7a630, ForceSwapChainDestruct=ForceSwapChainDestruct@entry=true)
at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:5451
#16 0x000055555574eb64 in CCommandProcessorFragment_Vulkan::CleanupVulkan<true>() (this=0x555555c7a630) at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:5462
#17 0x000055555575ee90 in CCommandProcessorFragment_Vulkan::Cmd_Shutdown(CCommandProcessorFragment_GLBase::SCommand_Shutdown const*) (pCommand=0x555556850f50, this=0x555555c7a630)
at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:6649
#18 CCommandProcessorFragment_Vulkan::RunCommand(CCommandBuffer::SCommand const*) (this=0x555555c7a630, pBaseCommand=0x555556850f50)
at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:6529
#19 0x00005555557672d6 in CCommandProcessor_SDL_GL::RunBuffer(CCommandBuffer*) (this=0x555555c7c580, pBuffer=<optimized out>) at /home/edgar/data/ddnet/src/engine/client/backend_sdl.cpp:335
#20 0x0000555555763186 in CGraphicsBackend_Threaded::ThreadFunc(void*) (pUser=pUser@entry=0x555555ad02a0) at /home/edgar/data/ddnet/src/engine/client/backend_sdl.cpp:63
#21 0x00005555556f4de7 in thread_run(void*) (user=<optimized out>) at /home/edgar/data/ddnet/src/base/system.cpp:764
#22 0x00007ffff53efaa3 in () at /lib64/libc.so.6
#23 0x00007ffff5471b5c in () at /lib64/libc.so.6
rm -rf build/*
env CXXFLAGS='-march=native -mtune=native' cmake -S . -B build/ \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-GNinja \
-DDEV=ON \
-DVULKAN=ON \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
ln -f -s build/compile_commands.json compile_commands.json
❯ git bisect bad
c8b69dd8156a4a36656d0467845ca9b02d20fc18 is the first bad commit
commit c8b69dd8156a4a36656d0467845ca9b02d20fc18
Author: Robert Müller <robytemueller@gmail.com>
Date: Wed May 10 20:51:25 2023 +0200
Properly uninitialize all client components
Track stack of cleaner functions that destruct client components so exactly the correct cleanup is performed in the reverse order of initialization.
This allows performing the cleanup also in the early-return cases without introducing duplicate code.
src/engine/client/client.cpp | 61 +++++++++++++++++++++++++++-----------------
1 file changed, 38 insertions(+), 23 deletions(-)
* thread #5, name = 'DDNet', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
frame #0: 0x00007ffff4f0fc70 libX11.so.6`_XSend + 48
libX11.so.6`_XSend:
-> 0x7ffff4f0fc70 <+48>: movq (%rax), %rsi
0x7ffff4f0fc73 <+51>: andl $0x1, %edx
0x7ffff4f0fc76 <+54>: movq %rsi, (%rsp)
0x7ffff4f0fc7a <+58>: jne 0x7ffff4f0fdb9 ; <+377>
(lldb) bt
* thread #5, name = 'DDNet', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
* frame #0: 0x00007ffff4f0fc70 libX11.so.6`_XSend + 48
frame #1: 0x00007ffff4f0600a libX11.so.6`XQueryExtension + 170
frame #2: 0x00007ffff4ef96f2 libX11.so.6`XInitExtension + 50
frame #3: 0x00007ffff4ec536d libXext.so.6`XextAddDisplay + 77
frame #4: 0x00007fffedfc9e6f libGLX_nvidia.so.0`___lldb_unnamed_symbol3788 + 239
frame #5: 0x00007fffedfeb665 libGLX_nvidia.so.0`___lldb_unnamed_symbol4144 + 69
frame #6: 0x00007fffded4d499 libnvidia-glcore.so.525.116.03`___lldb_unnamed_symbol75337 + 313
frame #7: 0x00007fffded4b86c libnvidia-glcore.so.525.116.03`___lldb_unnamed_symbol75283 + 124
frame #8: 0x00007fffded4cf9f libnvidia-glcore.so.525.116.03`___lldb_unnamed_symbol75329 + 31
frame #9: 0x00007fffded3f7fc libnvidia-glcore.so.525.116.03`___lldb_unnamed_symbol75086 + 316
frame #10: 0x00007fffded3fdfe libnvidia-glcore.so.525.116.03`___lldb_unnamed_symbol75094 + 110
frame #11: 0x00007fffded3ffc1 libnvidia-glcore.so.525.116.03`___lldb_unnamed_symbol75095 + 17
frame #12: 0x00007fffedfea7bc libGLX_nvidia.so.0`___lldb_unnamed_symbol4127 + 60
frame #13: 0x00005555558379ee DDNet`CCommandProcessorFragment_Vulkan::DestroySwapChain(this=0x0000555555f99f60, ForceDestroy=true) at backend_vulkan.cpp:4224:25
frame #14: 0x000055555583bfda DDNet`CCommandProcessorFragment_Vulkan::CleanupVulkanSwapChain(this=0x0000555555f99f60, ForceSwapChainDestruct=true) at backend_vulkan.cpp:5451:19
frame #15: 0x0000555555857c60 DDNet`void CCommandProcessorFragment_Vulkan::CleanupVulkan<true>(this=0x0000555555f99f60) at backend_vulkan.cpp:5462:27
frame #16: 0x000055555583fd56 DDNet`CCommandProcessorFragment_Vulkan::Cmd_Shutdown(this=0x0000555555f99f60, pCommand=0x0000555557150d10) at backend_vulkan.cpp:6649:22
frame #17: 0x000055555583f613 DDNet`CCommandProcessorFragment_Vulkan::RunCommand(this=0x0000555555f99f60, pBaseCommand=0x0000555557150d10) at backend_vulkan.cpp:6529:20
frame #18: 0x00005555558d0a63 DDNet`CCommandProcessor_SDL_GL::RunBuffer(this=0x0000555555f8f6c0, pBuffer=0x00007fffffffd390) at backend_sdl.cpp:335:38
frame #19: 0x00005555558cf7bb DDNet`CGraphicsBackend_Threaded::ThreadFunc(pUser=0x0000555555de32a0) at backend_sdl.cpp:63:34
frame #20: 0x00005555557ceae7 DDNet`::thread_run(user=0x0000555555edd8d0) at system.cpp:764:12
frame #21: 0x00007ffff53efaa3 libc.so.6`___lldb_unnamed_symbol3510 + 707
frame #22: 0x00007ffff5471b5c libc.so.6`___lldb_unnamed_symbol3936 + 11
pub fn create_dissector_handle() -> dissector_handle_t;
CStr::from_bytes_until_nul()
sorry for rubberducking in this channelT
’s destructor. This wrapper is 0-cost./proc/self/mem
SampledImageArrayNonUniformIndexing
SampledImageArrayNonUniformIndexing
println!
? ^^println!
? ^^"/proc/self/mem
log
here, but they're interoperable/home/user/linktoprocself/mem
declare void @llvm.memset.p0.i64(ptr <dest>, i8 <val>,
i64 <len>, i1 <isvolatile>)
free(malloc(0)); // you are free now, c is freedom
#include <string.h>
void *memset(void *s, int c, size_t n);
char
it would be a unsigned char
int is_cxx = sizeof(char) == sizeof('C');
sizeof (char)
is defined to be 1 anywaysizeof 'c' == 1
char/signed char/unsigned char
could be non 8-bitschar *p = memset(alloc(...), ...)
char *p = memset(alloc(...), ...)
char
and wchar_t
for every function#ifndef UNICODE
#define UNICODE
#endif
DoSomething(); // is a macro; resolves to DoSomethingW, a function
#ifdef UNICODE
#undef UNICODE
#endif
DoSomething(); // is a macro; resolves to DoSomethingA, a function
(edited)wchar_t *wmemset(wchar_t *wcs, wchar_t wc, size_t n);
(edited)#ifndef UNICODE
#define UNICODE
#endif
DoSomething(); // is a macro; resolves to DoSomethingW, a function
#ifdef UNICODE
#undef UNICODE
#endif
DoSomething(); // is a macro; resolves to DoSomethingA, a function
(edited)DoSomethingW
directlyDoSomethingW
directly W
variant explicity even though we define UNICODE
and _UNICODE
W
variant explicity even though we define UNICODE
and _UNICODE
wchar_t *wmemset(wchar_t *wcs, wchar_t wc, size_t n);
(edited)somehow
and (old)
str_format
str_format
str_format
CJsonWriter
from upstreamJson
str_format
Json
system("jq %s > %s")
SERVERINFO_LEVEL_MIN
/SERVERINFO_LEVEL_MAX
add something. I'd either remove them or make them into an enum that names the variants, I think< 0
and sometimes you have to say > 127
to check for ascii %3 = llvm.mlir.constant(296 : i64) : i64
%4 = llvm.mlir.null : !llvm.ptr
%5 = llvm.call @realloc(%4, %3) : (!llvm.ptr, i64) -> !llvm.ptr
%6 = llvm.mlir.constant(0 : i32) : i32
%7 = llvm.call @memset(%5, %6, %3) : (!llvm.ptr, i32, i64) -> !llvm.ptr
ez (edited)is:issue sort:updated-desc is:open -label:needs-discussion -label:to-reproduce -label:incomplete -label:"3rd party" -label:discussion
(with a bookmark) to find the issues to fixcellfun(@(x, y) {x, y}, n, d, 'UniformOutput', false)
friend
in every language I can think ofm_pClient
CComponent
, override one of the many fine hooks you can find in src/game/client.component.h
to do your things, register your component with all the other componentsCComponent
, override one of the many fine hooks you can find in src/game/client.component.h
to do your things, register your component with all the other components game/client/gameclient.h
as the compiler says it doesn't know what a CGameClient
is so it can't dereference it