Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Articles by GNU GPL'd
How Does Ada's Memory Safety Compare Against Rust?
~ajxs A comparison of how well Rust and Ada prevent the most common memory-related software errors. This article takes a look at the most common memory-related errors, and compares how well Rust and Ada prevent you from making them in the first place. Rust is better at outright preventing common memory-related errors, however Ada's avoidance of dynamic memory allocation and support for formal proof of correctness help you avoid many of the common errors altogether.
【手搓一个脚本语言】七、用C语言抽象语法树AST实现一个可交互运行的表达式计算器-CSDN博客
【手搓一个脚本语言】七、用C语言抽象语法树AST实现一个可交互运行的表达式计算器 接上一篇【手搓一个脚本语言】六、用C语言抽象语法树AST计算表达式的值-CSDN博客代码,再进一步改进!!! 目标:实现一个可交互运行的表达式计算器,即输入表达式,输出正确的表达式的结果值! 1.1 表达式只有一个数字 在处理右括时,判断当前运算符栈节点是否为空,如为空,将数字栈节点赋值给记号,然后再创建子节点! ... case ')': { AstNode node = NULL; Token tk = { .type = T_SUBA, .V.aobj = st[lv] }; if (st[lv] == NULL) tk.V.aobj = tp[lv]; node = astnode_new (tk); ... 在返回head前判断当前运算符栈节点是否为空,如为空,将数字栈节点赋值给head! ... if (st[lv] == NULL) { if (tp[lv] == NULL) {} else head = tp[lv]; } else { head = st[lv]; } ...
Identifying Insecure C Code with Valgrind and Fixing with Snyk Code
C and C++ remain foundational in critical software development. These languages power a wide array of systems, from embedded devices to high-performance applications in manufacturing, operational technology (OT), and the industrial market. Their efficiency, control over system resources, and performance make them indispensable for developers working on mission-critical projects. C and C++ are particularly prevalent in Japan, where manufacturing and industrial sectors are key economic drivers.
The power of Mechanical Sympathy in Software Engineering
Modern software programming languages, compilers, and frameworks abstract away underlying complexities and details, allowing developers to focus on building systems and applications to solve business problems. This design enables engineers to specialize and build expertise in specific layers, pushing boundaries.
Finding memory leaks in Postgres C code
I spent the last week looking for a memory leak in Postgres’s WAL Sender process. I spent a few days getting more acquainted with Valgrind and gcc/clang sanitizers, but ultimately got nowhere useful with them. Finally, I stumbled on the memleak program from the bcc tools collection which led me right to the source. Since I had a bit of trouble figuring this all out for the first time, I wanted to share the process I went through. Working with some contrived memory leaks.
V Language Review (2023)
So you’ve found a new programming language called V. It looks nice, has a lot of promises on the website, nice syntax, but how does it really work? Everything described here is correct for the b66447cf11318d5499bd2d797b97b0b3d98c3063 commit. This is a summary of my experience with the language over 6 months + information that I found on Discord while I was writing this article.
安卓平台valgrind交叉编译-CSDN博客
背景 通过上次的文章valgrind跨平台调试及其问题分析,为同事们在大部分平台下进行内存问题分析提供了帮助。但是也遇到了阻塞情况:android 平台,无法交叉编译通过。大家对于编译这件事,似乎天然有一种排斥,本能的拒绝,很少会去研究。只会淡淡的说一句“艺华,按照你的文档操作,我编译不过啊”。 呃…(内心无语) 短暂无语后,只能说:我来看看吧。 这次遇到的问题,个人感觉还是挺麻烦的。虽然最终的解决是解决掉了,但也是换了一个思路,投机取巧。本文我会将两者思路都进行描述,针对第一种方式,有知道原因的朋友,还请告知,十分感谢。若您急需答案,可以直接看方法二。 思路一 虽然该思路最终没有将问题解决,但是过程中的一些分析思路,还是希望能和大家分享。 该项目的host环境是android系统,并且客户提供的交叉编译工具链是ndk23。valgrind 的版本为3.22.0。 经过上篇文章,交叉编译的流程可以简单为: export 环境变量 执行configure,检测主机系统的特性,设置编译选项,确认安装路径,生成Makefile。 执行make -j8 编译。...
Linux上段错误(SegFault)的9种实用调试方法-CSDN博客
引言:什么是段错误 每个在Linux环境下工作的程序员,都遇到过段错误(segmentation fault)。 所谓段错误,本质上是程序访问了非法内存地址而引起的一种错误类型。 导致程序访问非法地址的原因有很多,如野指针、内存被踩、栈溢出、访问没有权限的内存等。 之前更新调试专题文章时,有朋友问到段错误的调试方法,我承诺会更新文章专门介绍,本文就是来填这个坑的。 本文将介绍9种非常实用的段错误调试方法。 1. 日志 日志是一种非常实用的调试手段,我们可以从系统日志中获得很多非常有用的信息,从而反推问题出现的前后系统中究竟发生了什么异常状况。 printf可能是最简单的日志记录方法,大家都懂的,不再赘述。 2.
在Linux上快速安装Valgrind和简单使用Valgrind对C++程序进行内存泄漏检测_巨龙之路的博客-CSDN博客
2023年8月17日,周四下午 目录 我使用的是CentOS 7,如果你使用的是其他Linux系统,操作也是大同小异 快速安装Valgrind 使用包管理器快速安装Valgrind yum install valgrind 简单使用Valgrind 使用g++编译程序,添加 -g 选项以生成调试信息。这将允许Valgrind更准确地报告内存错误。 g++ -g program.cpp -o program 使用Valgrind运行编译后的程序。 valgrind --leak-check=full ./program --leak-check=full选项指示Valgrind对内存泄漏进行详细检查。 举例说明 //Test.cpp #include<iostream> using namespace std; class Test{ }; void make_Test(){ Test* p=new Test(); } int main(){ Test *p=new Test(); new Test[5]; make_Test(); } g++ -g Test.cpp -o...
聊一聊 Valgrind 监视非托管内存泄露和崩溃
一:背景 1. 讲故事 只要是程序总会出现各种莫名其妙的问题,比如:非托管内存泄露,程序崩溃,在 Windows 平台上一般用微软自家的官方工具 App Verifier 就可以洞察,那问题出在 Linux 上怎么办呢?由于 Linux 崇尚自由,需要在各种牛鬼蛇神写的非官方开源软件中寻找一个比较靠谱的,比如本篇所说的 Valgrind。 个人感觉 Valgrind 和 App Verifer 定位是差不多的,技术上前者使用 hook 钩子,后者使用仿真cpu,有点像 windbg 的 TTD 调试,具体信息参考:https://valgrind.org/ 二:Valgrind 内存洞察 1. 安装 如果你用的是 ubuntu,可以用 apt-get 直接安装,方便快捷,目前最新的版本是 3.15.0 。 root@skyfly-virtual-machine:/home/skyfly/Desktop# apt-get install valgrind Reading package lists...
为什么会报错 malloc(): invalid size (unsorted)?
我在https://github.com/JamesRead5737/webcrawler/blob/master/crawler.c有一个网络爬虫代码,它产生了一些我无法解释的奇怪错误。最常见的是它中止并出现错误malloc(): invalid size (unsorted) 回溯显示: (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x00007ffff760e859 in __GI_abort () at abort.c:79 #2 0x00007ffff76793ee in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff77a3285 "%s\n") at ../sysdeps/posix/libc_fatal.c:155 #3 0x00007ffff768147c in malloc_printerr (str=str@entry=0x7ffff77a5a50...
Working with strings in Rust
Feb 19, 2020 34 minute read rust fasterthanlime There's a question that always comes up when people pick up the Rust programming language: why are there two string types? Why is there String, and &str? My Declarative Memory Management article answers the question partially, but there is a lot more to say about it, so let's run a few experiments and see if we can conjure up a thorough defense of Rust's approach over, say, C's.
What Are Protocol Buffers?
On a daily basis, I deal with custom software development and take part in projects for various industries. I specialize in the use of Modern C++ in embedded systems and building applications using Qt. Here, I will share with you my experience in a project that required Protocol Buffers on a memory-constrained embedded system. Let's take a look! Imagine a situation where several people meet and each of them speaks a different language.
V Language Review (2022)
V is a programming language promising to be “Simple, fast, safe, compiled. For developing maintainable software.” V has a controversial past but what is the state of V in 2022? Is V worth checking out? In this post, we’ll take a look at V as it exists in May 2022. TLDR Read the summary Rules of engagement I’ll be using the current version of V built from git which is 50ab2cfd1ae02d4f4280f38c60b8dbd17f7599f6.
A Haskell memory leak in way too much detail with Cachegrind
Haskell’s laziness gives us great benefits, but comes with costs. One of the most visible cost of laziness is hard to predict memory behavior, and so we have, and need, tools to profile and measure the heap of our Haskell programs. Most of the time, we live in a high-level world of type classes, monoids, and isomorphisms. But at the end of the day our code needs to run on actual machines, and when our code is run it needs to be performant.
Writing a simple JSON library from scratch: a tour through modern C++
Modern C++ has a lot of cool features. Move semantics means passing around structs in functions is cheap. std::shared_ptr means I don't have to manage any memory; no more new/delete! (But try as I might to understand std::unique_ptr, I'm just not there yet.) The syntax has also gotten some treatment with auto and tuple destructuring. In order to test out this modern C++ I wanted a small but meaningful project that operates on very dynamic data.
A practical guide to WebAssembly memory - radu's blog
WebAssembly memory Memory in WebAssembly is one of the topics that creates confusion for newcomers, particularly for those with experience in languages with memory management features like garbage collection , such as JavaScript, Go, or Java.
Constant-time code verification with Memory Sanitizer
In the cryptography context, the side-channel attacks are about exploiting computer system implementation to gain information about the secret key. First such attacks were introduced by Paul Kocher in his paper called “Timing Attacks on Implementations of Diffie-Hellman, RSA, DSS, and Other Systems”. Since then attacks were much improved to include different sources of side-channel information like power consumption, and electromagnetic and acoustic emissions.
Show More
loading
Actions
Is this you?
As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.Get in touch with GNU
Contact GNU, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack