{module dev}include <sys/time.h> on 32bit linux cause segmentation fault?
Conan
conanmind at gmail.com
Thu May 26 07:36:42 MSD 2011
hi, I'm wring a nginx module which is hooked at
NGX_HTTP_ACCESS_PHASE. Segmentation fault happened when calling
ngx_log_error(NGX_LOG_ERR, r->connection->log, "xxx") in my module's
handler(which will handle every request). I found r->connection->log = 0x0
when debug with gdb.
On 64bit centos/ubuntu/macos module works well. Segmentation fault seem
only occurs on 32bit linux(ubuntu).
When I comment out #include <sys/time.h>, segmentation fault disappeared.
Attachment is my module's skeleton.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx-devel/attachments/20110526/9bc6e03d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ngx_http_test_module.c
Type: text/x-csrc
Size: 3332 bytes
Desc: not available
URL: <http://nginx.org/pipermail/nginx-devel/attachments/20110526/9bc6e03d/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config
Type: application/octet-stream
Size: 180 bytes
Desc: not available
URL: <http://nginx.org/pipermail/nginx-devel/attachments/20110526/9bc6e03d/attachment.obj>
More information about the nginx-devel
mailing list