[naviserver-devel] Crash in x64 mode in Ns_Log

2007-10-12 Thread Vlad Seryakov
Hi,

This is an example when it crashes inside vsnprintf, experimenting i 
found  that issuing long unknown command crashes as well. In my case i 
noticed that trying to log long lines does not work as well. In x32 
everything works fine

db:vlad[18:01:19]#uname -a
Linux db 2.6.22-ARCH #1 SMP PREEMPT Thu Oct 4 11:47:51 EDT 2007 x86_64 
Intel(R) Xeon(R) CPU   X5355  @ 2.66GHz GenuineIntel GNU/Linux


ossweb:nscp 1
ossweb:nscp 1 aa

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] ns_config read/write

2007-10-12 Thread Vlad Seryakov
In it will not hurt performance when constantly asking for config 
parameter with locking i am fine with it. Can be also compile time 
option for configure

Vasiljevic Zoran wrote:
 So:
 
 
The configuration is global and read-only. Parameters may be  
 retrieved at
run-time using [cmd ns_config], although usually configuration  
 parameters are
used by Tcl library files at start-up.
 
 I submitted a patch/module to RFE section since some time
 already, that implements the config storage
 that is read/write. The emphasis was to minimize
 locking for readers (making readers fast) on the cost
 of making writers slow(er).
 
 Has anybody checked that? Because I think that we might
 really use that module as a replacement for the read-only
 version that is currently in place. We may even make the
 (new module) read-only per switch (default) but allow
 read-write for those who might need it (we, for example).
 
 Any ideas, objections?
 
 
 
 
 -
 This SF.net email is sponsored by: Splunk Inc.
 Still grepping through log files to find problems?  Stop.
 Now Search log events and configuration files using AJAX and a browser.
 Download your FREE copy of Splunk now  http://get.splunk.com/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Crash in x64 mode in Ns_Log

2007-10-12 Thread Gustaf Neumann

be sure to terminate va_* argument lists with NULL (or to be on the safe 
side
with  (char*)NULL) and not with 0. when you have sizeof(int) != 
sizeof(char *),
the compiler will put a 32bit  for 0, a comparison with a 64bit null 
pointer
will fail. I am pretty sure, the vsnprintf()  tries to write an error 
message
and misses the end of the var arg list

-gustaf neumann

PS: fixed a similar issue in xotcl more than a year ago.

Vlad Seryakov schrieb:
 Hi,

 This is an example when it crashes inside vsnprintf, experimenting i 
 found  that issuing long unknown command crashes as well. In my case i 
 noticed that trying to log long lines does not work as well. In x32 
 everything works fine

 db:vlad[18:01:19]#uname -a
 Linux db 2.6.22-ARCH #1 SMP PREEMPT Thu Oct 4 11:47:51 EDT 2007 x86_64 
 Intel(R) Xeon(R) CPU   X5355  @ 2.66GHz GenuineIntel GNU/Linux


 ossweb:nscp 1
 ossweb:nscp 1 aa

 -
 This SF.net email is sponsored by: Splunk Inc.
 Still grepping through log files to find problems?  Stop.
 Now Search log events and configuration files using AJAX and a browser.
 Download your FREE copy of Splunk now  http://get.splunk.com/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
   


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Crash in x64 mode in Ns_Log

2007-10-12 Thread Vlad Seryakov
I use ns_log or Ns_Log, so it should take care about it, it ends up in 
Ns_DStringPrintf which calls vsnprintf.


Is it correct in x64 to pass *va_list?

Ns_VALog(Ns_LogSeverity severity, CONST char *fmt, va_list *vaPtr)

Gustaf Neumann wrote:
 be sure to terminate va_* argument lists with NULL (or to be on the safe 
 side
 with  (char*)NULL) and not with 0. when you have sizeof(int) != 
 sizeof(char *),
 the compiler will put a 32bit  for 0, a comparison with a 64bit null 
 pointer
 will fail. I am pretty sure, the vsnprintf()  tries to write an error 
 message
 and misses the end of the var arg list
 
 -gustaf neumann
 
 PS: fixed a similar issue in xotcl more than a year ago.
 
 Vlad Seryakov schrieb:
 Hi,

 This is an example when it crashes inside vsnprintf, experimenting i 
 found  that issuing long unknown command crashes as well. In my case i 
 noticed that trying to log long lines does not work as well. In x32 
 everything works fine

 db:vlad[18:01:19]#uname -a
 Linux db 2.6.22-ARCH #1 SMP PREEMPT Thu Oct 4 11:47:51 EDT 2007 x86_64 
 Intel(R) Xeon(R) CPU   X5355  @ 2.66GHz GenuineIntel GNU/Linux


 ossweb:nscp 1
 ossweb:nscp 1 aa

 -
 This SF.net email is sponsored by: Splunk Inc.
 Still grepping through log files to find problems?  Stop.
 Now Search log events and configuration files using AJAX and a browser.
 Download your FREE copy of Splunk now  http://get.splunk.com/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
   
 
 
 -
 This SF.net email is sponsored by: Splunk Inc.
 Still grepping through log files to find problems?  Stop.
 Now Search log events and configuration files using AJAX and a browser.
 Download your FREE copy of Splunk now  http://get.splunk.com/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel