Category Archives: Stuff about Compiler

Compiler Theory

Understanding kcov – play with -fsanitize-coverage=trace-pc from the user space

kcov is a kernel feature used to support syzkaller[1]. To provide the code coverage information from the kernel itself, the GCC compiler was patched to instrument the kernel image[2]. The kernel itself was also patched to enable this feature where … Continue reading

Posted in OS, Security, Stuff about Compiler | Tagged , , | Leave a comment

gcc, llvm, and Linux kernel

This post talks about what happened recently in the Linux kernel mailing list discussion. While this post does not dig into compiler internals or the whole picture between the Linux kernel and compilers, we discuss 2 specific issues from gcc … Continue reading

Posted in OS, Stuff about Compiler | Tagged , , , , | Leave a comment

Python Internals – Integer object pool (PyIntObject)

Starting from this post, I will try to make a series of blogs on Python Internals, where Python object mechanism, Python bytecode (pyc) and Python VM are gonna be discussed. We will also talk about the limited resource online about … Continue reading

Posted in Programming, Stuff about Compiler | Tagged , | Leave a comment

Python Hacking – urlopen timeout issue

Recent playing with Python urllib2 reveals an interesting fact that the timeout parameter of urlopen() does not work sometimes. The interesting issue has successfully pushed me deep into the Python source code for debugging. The final debugging, without surprise, shows … Continue reading

Posted in Programming, Stuff about Compiler | Tagged , , , , , , | 4 Comments

Something about float point math – function call vs. operator

This post is triggered by a question of Python – “Is there any difference between pow() and ** operator?”. Similarly, this question applies to C and Java – “Is there any difference between pow(1, 2) and 1*1?”. The first thing … Continue reading

Posted in Programming, Stuff about Compiler | 1 Comment

gprof and dot – some hints using gprof, gprof2dot and dot

Recently done a performance tuning using gprof, gprof2dot and dot. While there are already a lot of webs talking about them respectively or generally. This post is trying to provide some hints from my real experience, as well as some … Continue reading

Posted in IDE_Make, Programming, Stuff about Compiler | Tagged , , | Leave a comment

A bad include in C – why static code analysis is needed for modern C/C++ projects

We have already had a long discussion and argument for ‘include’ mechanism in C/C++, no matter good or bad, and this is not my intention here. I am writing this post to show a confusing compiler error we have recently … Continue reading

Posted in Programming, Static Code Analysis, Stuff about Compiler | Tagged , , | Leave a comment