Debug

共 105 篇文章。

赞一个minidump

• Kernel

Peter Wemm大长辈实现了在i386和amd64平台上的minidump。刚刚尝试了一下手动panic之后的结果,从512MB锐减到32MB了,而且该有的数据都有,确实不错。

参与评论

终于抓住了py-ldap中的内存泄漏!!

• Development

之前曾经误认为 Python中存在内存泄漏,不过最终证明还是C程序的问题。Py-LDAP2这个模块在某些情况下,会泄漏一个空的List,具体泄漏代码如下:

retval = Py_BuildValue("(OOiO)", result_str, pmsg, res_msgid, pyctrls ? pyctrls : PyList_New(0));

当pyctrls == NULL时,Py_BuildValue()会为PyList_New(0)生成的那个对象再增加一个引用,这样会导致泄漏。这一问题会发生于调用result()而all=0的情形。

阅读全文… ( 本文约 196 字,阅读大致需要 1 分钟 )

My misunderstanding of OpenLDAP API

• Development

I used to think that ldap_unbind() is the opposite of ldap_bind(), however I was wrong. Pierangelo Masarati (ando at openldap) pointed out that it was actually opposite of ldap_init(). So, do NOT expect init() -> bind() -> search() -> unbind() -> bind() would success, it’s simply wrong thing. You do not need to unbind() before you do another bind().

Just make a note.

参与评论

漏啊,漏啊

• Development

今天给某个维护OpenLDAP相关port的老大提了几个patch,等他消息了。

另外就是Python自己也会有泄漏,而且居然是gc部分自己出了许多tuple,这年头:(

参与评论

OpenLDAP的内存泄漏

• Development

今天发现了OpenLDAP client库的一个内存泄漏(每次连接会漏掉大约80字节),并提交了ITS patch(4441),不过我觉得这里面上锁上的还是有点问题的,至少逻辑不是很清楚。

参与评论

给csh增加了简体中文(GBK)支持

• Development

对GBK的locale做了一些改动,使得其能够提供正确的字符宽度信息了。这样一来,csh就能够正确处理GBK的中文了。昨天还增加了正体(我们叫做繁体)中文对应的locale变化。

阅读全文… ( 本文约 119 字,阅读大致需要 1 分钟 )