Hello!
On Tue, Sep 24, 2013 at 3:48 AM, <
in...@ecsystems.nl> wrote:
>>Looks like I need to run a Windows box to test my code sometime in the
>> future :)
>
> Get yourself virtualbox, surely you got some w7 license laying about doing
> nothing :)
>
Yes, in a virtual machine. Possibly on Amazon EC2 though because I
don't want to buy Windows myself.
>>Please try out these two project's git master again on your side :)
>>
> Done, here are the patches and other findings, its not too big to fit here;
Thank you for trying it out again! I've submitted a patch to ngx_lua's
master that fixed most of these warnings:
https://github.com/chaoslawful/lua-nginx-module/commit/c6b6b31
and also committed a patch to ngx_devel_kit's master:
https://github.com/simpl/ngx_devel_kit/commit/4944025
> lua-nginx-module/src/ngx_http_lua_control.c(258) : warning C4307: '*' :
> integral constant overflow
> see also
http://msdn.microsoft.com/en-us/library/4kze989h.aspx
> ngx_http_lua_control.c
> line 257:
> ngx_hash(ngx_hash(ngx_hash(ngx_hash(ngx_hash(ngx_hash(
> ngx_hash('l', 'o'), 'c'), 'a'), 't'), 'i'), 'o'), 'n');
> *I count 7x ngx_hash but 8 hash values.
>
This is not the real issue. ngx_hash takes 2 arguments hence the difference.
>
> lua-nginx-module/src/ngx_http_lua_subrequest.c(1159) : warning C4307: '*' :
> integral constant overflow
Yeah, as the warning itself suggests, the real issue is 32-bit integer
overflow on 32-bit systems. The overflow itself is indeed the expected
behavior when calculating the string hash so all we need is to
suppress this warning.
Already fixed in my new patch.
> ngx_http_lua_subrequest.c: line 1156:
> h->hash =
> ngx_hash(ngx_hash(ngx_hash(ngx_hash(ngx_hash(ngx_hash(ngx_hash(
> ngx_hash(ngx_hash(ngx_hash(ngx_hash(ngx_hash(
> ngx_hash('c', 'o'), 'n'), 't'), 'e'), 'n'), 't'), '-'), 'l'),
> 'e'),
> 'n'), 'g'), 't'), 'h');
Already fixed in my patch.
> \ngx_devel_kit\src\ndk_log.h(162) :fatal error C1021: invalid preprocessor
> command 'warning'
> -162
> #warning "Nginx Devel Kit logging without variadic macros not yet
> implemented"
> +162
> /* #warning "Nginx Devel Kit logging without variadic macros not yet
> implemented" */
>
Already fixed in my patch.
> /lua-nginx-module/src/ngx_http_lua_shdict.c(972) : error C2065: 'ushort' :
> undeclared identifier
> /lua-nginx-module/src/ngx_http_lua_shdict.c(972) : error C2146: syntax error
> : missing ';' before identifier 'key'
> /lua-nginx-module/src/ngx_http_lua_shdict.c(1079) : error C2065: 'ushort' :
> undeclared identifier
> /lua-nginx-module/src/ngx_http_lua_shdict.c(1079) : error C2146: syntax
> error : missing ';' before identifier 'key'
Nice catch. Already fixed in my patch.
> /lua-nginx-module/src/ngx_http_lua_output.c(395) : warning C4244: '=' :
> conversion from 'double' to 'int', possible loss of data
>
Already fixed in my patch.
> objs/lib/lua-nginx-module/src/ngx_http_lua_headers_out.c(147) : warning
> C4307: '*' : integral constant overflow
> objs/lib/lua-nginx-module/src/ngx_http_lua_headers_out.c(147) : warning
> C4307: '*' : integral constant overflow
> objs/lib/lua-nginx-module/src/ngx_http_lua_headers_out.c(538) : warning
> C4307: '*' : integral constant overflow
> objs/lib/lua-nginx-module/src/ngx_http_lua_headers_out.c(538) : warning
> C4307: '*' : integral constant overflow
>
They should already be fixed in my patch.
> objs/lib/lua-nginx-module/src/ngx_http_lua_clfactory.c(368) : warning C4022:
> 'GetFileInformationByHandle' : pointer mismatch for actual parameter 1
> objs/lib/lua-nginx-module/src/ngx_http_lua_clfactory.c(368) : warning C4996:
> 'fileno': The POSIX name for this item is deprecated. Instead, use the ISO
> C++ conformant name: _fileno. See online help for details.
>
These two are due to the pending compatibility issue in the Lua/LuaJIT
bytecode file loader in ngx_lua that I mentioned:
https://github.com/chaoslawful/lua-nginx-module/issues/283
I'm waiting for jinglong to see if he'd like to fix it.
Could you please try out the new masters of ngx_lua and ngx_devel_kit
again on your side?
Thanks!
-agentzh