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 , , | 1 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

itevad – How to write your own protocol and its stack – part 9

Previous_Part_8 Now we are moving to the last post of ‘itevad’ – writing a stack for decoding text format of Itevad Protocol using Flex and Bison as well as C as a main function. Being different with previous Flex and … Continue reading

Posted in Dave's Tools, H.248/MEGACO/EGCP, Programming, Stuff about Compiler | Tagged , , | Leave a comment

itevad – How to write your own protocol and its stack – part 8

Previous_Part_7 After writing a Flex standalone lexer, we are going to make it a little bit useful – adding parser, Bison. When Flex and Bison work together, standalone flex file needs some changes to cooperate with Bison, as you will … Continue reading

Posted in Dave's Tools, H.248/MEGACO/EGCP, Programming, Stuff about Compiler | Tagged , , | Leave a comment

itevad – How to write your own protocol and its stack – part 7

Previous_Part_6 From this post, we will have to learn Flex and Bison, which are assumed to have very bizarre grammars to write and understand. Fortunately, we will step forwardly from Flex standalone, Flex+Bison and Flex+Bison+C finally. Please kindly note that … Continue reading

Posted in Dave's Tools, H.248/MEGACO/EGCP, Programming, Stuff about Compiler | Tagged , , | Leave a comment