Archive for June, 2015


June 27th, 2015 No comments



中国 北京
HelloGCC工作组 (


* GNU工具链(gcc,gdb,binutils等)
* LLVM等其它开源编译器
* 其它开源开发、调试、模拟工具

* 对自己工作的介绍
* 对已有工作的介绍
* 教程,经验等
* 其它形式,比如闪电演讲

* 发送邮件到 (需要先订阅:
* 登陆freenode IRC #hellogcc房间

* 话题征集截止日期:2015年8月1日

* OSDT 2014:
* HelloGCC 2013:
* HelloGCC 2012:
* HelloGCC 2011:
* HelloGCC 2010:
* HelloGCC 2009:


Code Review Checklist

June 27th, 2015 No comments

Nice Checklist.

我之前并未整理出这样的清单。可以实践一下。 🙂

Code Review Checklist


* Does the code work? Does it perform its intended function, the logic is correct etc.
* Is all the code easily understood?
* Does it conform to your agreed coding conventions? These will usually cover location of braces, variable and function names, line length, indentations, formatting, and comments.
* Is there any redundant or duplicate code?
* Is the code as modular as possible?
* Can any global variables be replaced?
* Is there any commented out code?
* Do loops have a set length and correct termination conditions?
* Can any of the code be replaced with library functions?
* Can any logging or debugging code be removed?


* Are all data inputs checked (for the correct type, length, format, and range) and encoded?
* Where third-party utilities are used, are returning errors being caught?
* Are output values checked and encoded?
* Are invalid parameter values handled?


* Do comments exist and describe the intent of the code?
* Are all functions commented?
* Is any unusual behavior or edge-case handling described?
* Is the use and function of third-party libraries documented?
* Are data structures and units of measurement explained?
* Is there any incomplete code? If so, should it be removed or flagged with a suitable marker like ‘TODO’?


* Is the code testable? i.e. don’t add too many or hide dependencies, unable to initialize objects, test frameworks can use methods etc.
* Do tests exist and are they comprehensive? i.e. has at least your agreed on code coverage.
* Do unit tests actually test that the code is performing the intended functionality?
* Are arrays checked for ‘out-of-bound’ errors?
* Could any test code be replaced with the use of an existing API?

You’ll also want to add to this checklist any language-specific issues that can cause problems.

The checklist is deliberately not exhaustive of all issues that can arise. You don’t want a checklist, which is so long no-one ever uses it. It’s better to just cover the common issues.



没完没了:GCC Version numbers question

June 24th, 2015 No comments

GCC 社区也要打算开始飙版本号,这是去年就开始讨论的事情了。但是直到今天,还有人在吐槽这个事情,汗。

“No space left on device“ 的解决过程

June 20th, 2015 No comments

管理的一个集群上的 HW RAID FS 出现了这个问题:

  1. df 检查,磁盘空间只用了一半;
  2. df -i 检查,inode 空间只用了 1%,还很充足;
  3. 猜测可能是IO缓冲或文件读写异常,用 lsof 检查,没有问题;
  4. 停掉 NFS 服务,umount,再 mount 回来,问题依旧;
  5. 使用 smartctl 命令检查 RAID 状态,没有发现问题;
  6. 注意到文件系统是 XFS,使用 xfs_repair 自动修复,重新挂载,问题依旧;
  7. 最后的猜测是因为 XFS 的前 1TB 满了,添加了 inode64 的选项,重新挂载,问题搞定。
  8. 最后,别忘记重新开始NFS服务。




修改 XMind 默认的中文字体

June 20th, 2015 No comments

XMind 在 Windows 7 下的默认中文字体不太好看,在其配置选项中没有提供该选项。一位使用者提供了一种直接修改配置文件的方式,可以参考:

在 Windows 7 下,可以将默认字体改成“SimSong”或者“Microsoft YaHei”; Linux 下可以改成 “WenQuanYi Zen Hei”。