In-depth Understanding of eBPF-based C/C++ Memory Leak Analysis

For C/C++ programmers, memory leak is a perennial issue. There are many methods to troubleshoot memory leaks, such as using tools like valgrind, gdb, asan, tsan, etc., but each of these tools has its limitations. For example, valgrind slows down program execution, gdb requires understanding of the code and manual breakpoint setting, while asan and tsan require recompiling the program. For complex services that are already running, these methods are not very convenient.

Memory leak flame graph obtained through eBPF analysis

Fortunately, with eBPF, we can analyze memory leak problems without recompiling the program and with minimal impact on program execution speed. The power of eBPF is evident, but eBPF is not a silver bullet. There are still many issues to be resolved when using it to analyze memory leaks. This article will discuss the common problems encountered in eBPF-based detection.

Read More

ChatGPT Search Trends, Demand Mapping, and User Characteristics

ChatGPT burst onto the scene in 2023, and in just over half a year, it has become proficient in understanding and generating text, comprehending and creating beautiful images, and interpreting and writing code, bringing endless possibilities to various industries. From initial popularity in tech circles to now attracting interest from an increasing number of people around us, it seems we are not far from the AI era.

However, some people are skeptical about ChatGPT’s popularity, believing it’s just a temporary trend that won’t significantly impact our lives. So, how popular is ChatGPT really? How deep is its penetration? This article will discuss ChatGPT’s penetration from three aspects: search trends, application scenarios, and user characteristics.

ChatGPT's Penetration

Read More

C++ Zip Archive Creation - Debugging Memory Corruption Issue

In daily C++ backend development work, dynamically generating Zip packages is rare, so I’m not familiar with C++’s libzip. Recently, I encountered a scenario where I needed to compress some backend-generated data into a Zip package for download. There was already existing code for generating Zip packages, but I needed to add a file to the Zip package. It seemed like a simple requirement, but during implementation, I encountered a strange problem: after unzipping the generated Zip package, the beginning of the files inside was corrupted.

C++ Zip Archive Creation Corruption Issue

Read More