Re: CVS commit: src/usr.sbin/envstat
On Fri, Dec 14, 2012 at 06:18:57PM +0100, Marc Balmer wrote: > > Ironically, proper ressource managements tends to make it much easier to > > fulfill at least two of the three items... > > proper resource management is a good thing - if the code continues to run. > In this case, where the program exits, there no benefit from freeing up > memory etc. And this is the reason why I've programmed in Java. And why I like C, on the other hand. And why we have Lua in the base system. - Jukka.
Re: CVS commit: [netbsd-6-0] src/external/bsd/bind/dist
On 12/14/12 12:22 AM, Erik Fair wrote: On Dec 13, 2012, at 09:42, Jeff Rizzo wrote: Module Name:src Committed By: riz Date: Thu Dec 13 17:42:04 UTC 2012 Modified Files: src/external/bsd/bind/dist [netbsd-6-0]: CHANGES version src/external/bsd/bind/dist/bin/named [netbsd-6-0]: query.c Log Message: external/bsd/bind/dist/CHANGES patch external/bsd/bind/dist/version patch external/bsd/bind/dist/bin/named/query.cpatch Address CVE-2012-5688: Named could die on specific queries with dns64 enabled. [spz, ticket #740] Is there some reason why this change was not also pulled up to "netbsd-6"? curious, Erik Yes, netbsd-6 is getting a full-on new version of bind, but we're currently working out details of the patch. More soon. +j
Re: CVS commit: src/usr.sbin/envstat
Am 14.12.2012 um 18:05 schrieb Joerg Sonnenberger : > On Fri, Dec 14, 2012 at 05:51:44PM +0100, Marc Balmer wrote: >> >> >> Am 14.12.2012 um 17:07 schrieb Joerg Sonnenberger : >> >>> On Fri, Dec 14, 2012 at 08:59:37AM +, David Laight wrote: Similarly it just isn't worth trying to free resources prior to program exit. Have you ever waited while a big C++ program runs all its destructors, paging in code and data just to exit! >>> >>> Depends, it makes tools like valgrind a lot easier to use. >>> >> >> Source code should be optimized for readability, performance, >> stability, and not for debug tools. > > Ironically, proper ressource managements tends to make it much easier to > fulfill at least two of the three items... proper resource management is a good thing - if the code continues to run. In this case, where the program exits, there no benefit from freeing up memory etc.
Re: CVS commit: src/usr.sbin/envstat
On Fri, Dec 14, 2012 at 05:51:44PM +0100, Marc Balmer wrote: > > > Am 14.12.2012 um 17:07 schrieb Joerg Sonnenberger : > > > On Fri, Dec 14, 2012 at 08:59:37AM +, David Laight wrote: > >> Similarly it just isn't worth trying to free resources prior > >> to program exit. Have you ever waited while a big C++ program > >> runs all its destructors, paging in code and data just to exit! > > > > Depends, it makes tools like valgrind a lot easier to use. > > > > Source code should be optimized for readability, performance, > stability, and not for debug tools. Ironically, proper ressource managements tends to make it much easier to fulfill at least two of the three items... Joerg
Re: CVS commit: src/usr.sbin/envstat
Am 14.12.2012 um 17:07 schrieb Joerg Sonnenberger : > On Fri, Dec 14, 2012 at 08:59:37AM +, David Laight wrote: >> Similarly it just isn't worth trying to free resources prior >> to program exit. Have you ever waited while a big C++ program >> runs all its destructors, paging in code and data just to exit! > > Depends, it makes tools like valgrind a lot easier to use. > Source code should be optimized for readability, performance, stability, and not for debug tools. And that means to consider realities like the fact that on Unix resources are freed when the process exits and an explicit free is counter productive if terms of effectiveness. > Joerg
Re: CVS commit: src/usr.sbin/envstat
On Fri, Dec 14, 2012 at 08:59:37AM +, David Laight wrote: > Similarly it just isn't worth trying to free resources prior > to program exit. Have you ever waited while a big C++ program > runs all its destructors, paging in code and data just to exit! Depends, it makes tools like valgrind a lot easier to use. Joerg
Re: CVS commit: src/usr.sbin/envstat
On Thu, Dec 13, 2012 at 08:45:02PM -0800, Paul Goyette wrote: > It seems that the following commit has introduced a regression for the > dev/sysmon/t_swsensor atf tests (for details, see test results at > http://screamer.whooppee.com/amd64-results/4722_1_atf.html) > > >Module Name:src > >Committed By: christos > >Date: Thu Dec 13 20:06:42 UTC 2012 > > > >Modified Files: > >src/usr.sbin/envstat: envstat.c > > > >Log Message: > >- no point in allocating memory to hold command line arguments. > >- allocate memory inside the function used. > > I'll take a look and see what happened. The tests should get fixed > fairly soon. If you are worried about malloc() fails then (maybe) allocating memory when parsing the command line would make sense - since any fail is then guaranteed to happen before any processing. OTOH malloc() is unlikely to fail for small programs unless someone is testing whether the program survives malloc failure. Similarly it just isn't worth trying to free resources prior to program exit. Have you ever waited while a big C++ program runs all its destructors, paging in code and data just to exit! About the only environment wheere is matters is when programs are run as shell builtins - and that will always be a small subset of programs. David -- David Laight: da...@l8s.co.uk
Re: CVS commit: [netbsd-6-0] src/external/bsd/bind/dist
On Dec 13, 2012, at 09:42, Jeff Rizzo wrote: > Module Name: src > Committed By: riz > Date: Thu Dec 13 17:42:04 UTC 2012 > > Modified Files: > src/external/bsd/bind/dist [netbsd-6-0]: CHANGES version > src/external/bsd/bind/dist/bin/named [netbsd-6-0]: query.c > > Log Message: > external/bsd/bind/dist/CHANGESpatch > external/bsd/bind/dist/versionpatch > external/bsd/bind/dist/bin/named/query.c patch > > Address CVE-2012-5688: Named could die on specific queries with dns64 > enabled. > [spz, ticket #740] Is there some reason why this change was not also pulled up to "netbsd-6"? curious, Erik