<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/features/marker/utils/src/gsyncd.c, branch v3.4.4beta1</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>core: fix Ubuntu code audit (cppcheck) results</title>
<updated>2014-05-25T10:52:01+00:00</updated>
<author>
<name>Kaleb S. KEITHLEY</name>
<email>kkeithle@redhat.com</email>
</author>
<published>2014-04-28T18:25:09+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=d5e317718f4137431c3996ac5f38e9226620e760'/>
<id>d5e317718f4137431c3996ac5f38e9226620e760</id>
<content type='text'>
These block inclusion in Ubuntu Main repo.

AFAICT these are false positives:

[rpc/rpc-transport/rdma/src/rdma.c:3074]: (error) Address of local auto-variable assigned to a function parameter.
[xlators/features/marker/utils/src/gsyncd.c:99]: (error) Memory leak: str
[xlators/features/marker/utils/src/gsyncd.c:354]: (error) Memory leak: argv
[xlators/nfs/server/src/nlm4.c:1176]: (error) Possible null pointer dereference: fde

The remainder are fixed with this change-set:

[api/src/glfs-fops.c:700]: (error) Possible null pointer dereference: gio
[api/src/glfs-fops.c:702]: (error) Possible null pointer dereference: frame
[xlators/cluster/afr/src/afr-inode-write.c:375]: (error) Possible null pointer dereference: frame
[xlators/cluster/afr/src/afr-self-heal-common.c:1522]: (error) Possible null pointer dereference: local
[xlators/cluster/dht/src/dht-rebalance.c:1574]: (error) Possible null pointer dereference: ctx
[xlators/cluster/stripe/src/stripe.c:4407]: (error) Possible null pointer dereference: local
[xlators/mgmt/glusterd/src/glusterd-mountbroker.c:675]: (error) Possible null pointer dereference: cookieswitch
[xlators/mgmt/glusterd/src/glusterd-mountbroker.c:677]: (error) Possible null pointer dereference: cookieswitch
[xlators/mgmt/glusterd/src/glusterd-replace-brick.c:924]: (error) Resource leak: file
[xlators/mgmt/glusterd/src/glusterd-replace-brick.c:1008]: (error) Resource leak: file
[xlators/mgmt/glusterd/src/glusterd-sm.c:248]: (error) Possible null pointer dereference: new_ev_ctx
[xlators/mgmt/glusterd/src/glusterd-store.c:1250]: (error) Possible null pointer dereference: handle
[xlators/mgmt/glusterd/src/glusterd-utils.c:4272]: (error) Possible null pointer dereference: this
[xlators/mgmt/glusterd/src/glusterd-utils.c:5113]: (error) Possible null pointer dereference: this
[xlators/mount/fuse/src/fuse-bridge.c:4432]: (error) Uninitialized variable: finh
[xlators/mount/fuse/src/fuse-bridge.c:2927]: (error) Possible null pointer dereference: state
[xlators/mount/fuse/src/fuse-bridge.c:3226]: (error) Possible null pointer dereference: state
[xlators/storage/bd_map/src/bd_map.c:1504]: (error) Possible null pointer dereference: bd_fd
[xlators/storage/bd_map/src/bd_map.c:1728]: (error) Possible null pointer dereference: n_entry
[xlators/storage/bd_map/src/bd_map.c:1741]: (error) Possible null pointer dereference: n_entry
[xlators/performance/quick-read/src/quick-read.c:585]: (error) Possible null pointer dereference: iobuf

rerunning cppcheck --force afterwards:

Test code, don't care:
[extras/test/test-ffop.c:27]: (error) Buffer overrun possible for long command line arguments.

False positive after fix
[xlators/cluster/stripe/src/stripe.c:4407]: (error) Possible null pointer dereference: local

Still false positive:
[xlators/features/marker/utils/src/gsyncd.c:354]: (error) Memory leak: argv
[xlators/nfs/server/src/nlm4.c:1176]: (error) Possible null pointer dereference: fde

Not built, don't care:
[xlators/cluster/ha/src/ha.c:2699]: (error) Possible null pointer dereference: priv

Change-Id: I1fb849e9c042d3a3701cb05121d413e58e73d505
BUG: 1086460
Signed-off-by: Kaleb S. KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-on: http://review.gluster.org/7583
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These block inclusion in Ubuntu Main repo.

AFAICT these are false positives:

[rpc/rpc-transport/rdma/src/rdma.c:3074]: (error) Address of local auto-variable assigned to a function parameter.
[xlators/features/marker/utils/src/gsyncd.c:99]: (error) Memory leak: str
[xlators/features/marker/utils/src/gsyncd.c:354]: (error) Memory leak: argv
[xlators/nfs/server/src/nlm4.c:1176]: (error) Possible null pointer dereference: fde

The remainder are fixed with this change-set:

[api/src/glfs-fops.c:700]: (error) Possible null pointer dereference: gio
[api/src/glfs-fops.c:702]: (error) Possible null pointer dereference: frame
[xlators/cluster/afr/src/afr-inode-write.c:375]: (error) Possible null pointer dereference: frame
[xlators/cluster/afr/src/afr-self-heal-common.c:1522]: (error) Possible null pointer dereference: local
[xlators/cluster/dht/src/dht-rebalance.c:1574]: (error) Possible null pointer dereference: ctx
[xlators/cluster/stripe/src/stripe.c:4407]: (error) Possible null pointer dereference: local
[xlators/mgmt/glusterd/src/glusterd-mountbroker.c:675]: (error) Possible null pointer dereference: cookieswitch
[xlators/mgmt/glusterd/src/glusterd-mountbroker.c:677]: (error) Possible null pointer dereference: cookieswitch
[xlators/mgmt/glusterd/src/glusterd-replace-brick.c:924]: (error) Resource leak: file
[xlators/mgmt/glusterd/src/glusterd-replace-brick.c:1008]: (error) Resource leak: file
[xlators/mgmt/glusterd/src/glusterd-sm.c:248]: (error) Possible null pointer dereference: new_ev_ctx
[xlators/mgmt/glusterd/src/glusterd-store.c:1250]: (error) Possible null pointer dereference: handle
[xlators/mgmt/glusterd/src/glusterd-utils.c:4272]: (error) Possible null pointer dereference: this
[xlators/mgmt/glusterd/src/glusterd-utils.c:5113]: (error) Possible null pointer dereference: this
[xlators/mount/fuse/src/fuse-bridge.c:4432]: (error) Uninitialized variable: finh
[xlators/mount/fuse/src/fuse-bridge.c:2927]: (error) Possible null pointer dereference: state
[xlators/mount/fuse/src/fuse-bridge.c:3226]: (error) Possible null pointer dereference: state
[xlators/storage/bd_map/src/bd_map.c:1504]: (error) Possible null pointer dereference: bd_fd
[xlators/storage/bd_map/src/bd_map.c:1728]: (error) Possible null pointer dereference: n_entry
[xlators/storage/bd_map/src/bd_map.c:1741]: (error) Possible null pointer dereference: n_entry
[xlators/performance/quick-read/src/quick-read.c:585]: (error) Possible null pointer dereference: iobuf

rerunning cppcheck --force afterwards:

Test code, don't care:
[extras/test/test-ffop.c:27]: (error) Buffer overrun possible for long command line arguments.

False positive after fix
[xlators/cluster/stripe/src/stripe.c:4407]: (error) Possible null pointer dereference: local

Still false positive:
[xlators/features/marker/utils/src/gsyncd.c:354]: (error) Memory leak: argv
[xlators/nfs/server/src/nlm4.c:1176]: (error) Possible null pointer dereference: fde

Not built, don't care:
[xlators/cluster/ha/src/ha.c:2699]: (error) Possible null pointer dereference: priv

Change-Id: I1fb849e9c042d3a3701cb05121d413e58e73d505
BUG: 1086460
Signed-off-by: Kaleb S. KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-on: http://review.gluster.org/7583
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gsyncd: allow the override of the compiled-in python path</title>
<updated>2013-02-08T01:17:18+00:00</updated>
<author>
<name>Joe Julian</name>
<email>me@joejulian.name</email>
</author>
<published>2012-11-30T22:17:31+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=83c84028552d41ec0914a0c5db97e6557d9fe039'/>
<id>83c84028552d41ec0914a0c5db97e6557d9fe039</id>
<content type='text'>
.. using the environment variable $PYTHON

Change-Id: Ieaad8be98b826c803268216826e250d9944c8190
BUG: 882127
Signed-off-by: Joe Julian &lt;me@joejulian.name&gt;
Signed-off-by: Anand Avati &lt;avati@redhat.com&gt;
Reviewed-on: http://review.gluster.org/4252
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
.. using the environment variable $PYTHON

Change-Id: Ieaad8be98b826c803268216826e250d9944c8190
BUG: 882127
Signed-off-by: Joe Julian &lt;me@joejulian.name&gt;
Signed-off-by: Anand Avati &lt;avati@redhat.com&gt;
Reviewed-on: http://review.gluster.org/4252
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>geo-rep / gsyncd: gsyncd binary wrapper context fixes</title>
<updated>2012-09-24T11:09:58+00:00</updated>
<author>
<name>Venky Shankar</name>
<email>vshankar@redhat.com</email>
</author>
<published>2012-08-27T14:24:20+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=5ad96fb5a8c79fe50c21a726a7cbda4eaa3b96cc'/>
<id>5ad96fb5a8c79fe50c21a726a7cbda4eaa3b96cc</id>
<content type='text'>
Changes to __gf_calloc (commit ed4b76ba) triggers a recursive
sequence of _gf_log() and __glusterfs_this_location() calls. This
is due to __gf_calloc() trying to access THIS which is not valid
in the context of geo replication binary wrapper. This patch fixes
the problem by introducing the relevant context in the wrapper.

Change-Id: I32b0b6927074692dbf66bad2f3e93434201aaa82
BUG: 846569
Signed-off-by: Venky Shankar &lt;vshankar@redhat.com&gt;
Reviewed-on: http://review.gluster.org/3859
Reviewed-by: Csaba Henk &lt;csaba@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Changes to __gf_calloc (commit ed4b76ba) triggers a recursive
sequence of _gf_log() and __glusterfs_this_location() calls. This
is due to __gf_calloc() trying to access THIS which is not valid
in the context of geo replication binary wrapper. This patch fixes
the problem by introducing the relevant context in the wrapper.

Change-Id: I32b0b6927074692dbf66bad2f3e93434201aaa82
BUG: 846569
Signed-off-by: Venky Shankar &lt;vshankar@redhat.com&gt;
Reviewed-on: http://review.gluster.org/3859
Reviewed-by: Csaba Henk &lt;csaba@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>All: License message change</title>
<updated>2012-09-13T20:19:37+00:00</updated>
<author>
<name>Varun Shastry</name>
<email>vshastry@redhat.com</email>
</author>
<published>2012-09-11T11:04:54+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=3e2057542da6a0f182243b527bc7f1fd43d1fd3c'/>
<id>3e2057542da6a0f182243b527bc7f1fd43d1fd3c</id>
<content type='text'>
License message changed for server-side, dual license GPLV2 and LGPLv3+.

Change-Id: Ia9e53061b9d2df3b3ef3bc9778dceff77db46a09
BUG: 852318
Signed-off-by: Varun Shastry &lt;vshastry@redhat.com&gt;
Reviewed-on: http://review.gluster.org/3940
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Kaleb KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
License message changed for server-side, dual license GPLV2 and LGPLv3+.

Change-Id: Ia9e53061b9d2df3b3ef3bc9778dceff77db46a09
BUG: 852318
Signed-off-by: Varun Shastry &lt;vshastry@redhat.com&gt;
Reviewed-on: http://review.gluster.org/3940
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Kaleb KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>All: License message change</title>
<updated>2012-08-28T10:45:06+00:00</updated>
<author>
<name>Varun Shastry</name>
<email>vshastry@redhat.com</email>
</author>
<published>2012-08-27T11:18:55+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=2ff5e1c2a1c0fedd437d2d892dfab21f720f5a1c'/>
<id>2ff5e1c2a1c0fedd437d2d892dfab21f720f5a1c</id>
<content type='text'>
The license message is changed to
  Copyright (c) 2008-2012 Red Hat, Inc. &lt;http://www.redhat.com&gt;
  This file is part of GlusterFS.

  This file is licensed to you under your choice of the GNU Lesser
  General Public License, version 3 or any later version (LGPLv3 or
  later), or the GNU General Public License, version 2 (GPLv2), in all
  cases as published by the Free Software Foundation.

Change-Id: I07d2b63ed5fbbbd1884f1e74f2dd56013d15b0f4
BUG: 852318
Signed-off-by: Varun Shastry &lt;vshastry@redhat.com&gt;
Reviewed-on: http://review.gluster.org/3858
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The license message is changed to
  Copyright (c) 2008-2012 Red Hat, Inc. &lt;http://www.redhat.com&gt;
  This file is part of GlusterFS.

  This file is licensed to you under your choice of the GNU Lesser
  General Public License, version 3 or any later version (LGPLv3 or
  later), or the GNU General Public License, version 2 (GPLv2), in all
  cases as published by the Free Software Foundation.

Change-Id: I07d2b63ed5fbbbd1884f1e74f2dd56013d15b0f4
BUG: 852318
Signed-off-by: Varun Shastry &lt;vshastry@redhat.com&gt;
Reviewed-on: http://review.gluster.org/3858
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gsyncd: don't use void* arithmetic; don't leak upon OOM; remove cast</title>
<updated>2012-08-19T16:42:43+00:00</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-07-31T10:27:02+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=7daa85508314838ce8f0c2cb731827d0f92eb5ee'/>
<id>7daa85508314838ce8f0c2cb731827d0f92eb5ee</id>
<content type='text'>
(duplexpand): Ignore risk of overflow in computation of the realloc
object count, since we'd need a string with 2^62 space-separated tokens
to trigger that (that's w/64-bit size_t; w/32-bit it'd be easier, but
still improbable).

Change-Id: If4521afe7b46110742991dd0ee234284ef8970df
BUG: 846755
Signed-off-by: Jim Meyering &lt;meyering@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3793
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(duplexpand): Ignore risk of overflow in computation of the realloc
object count, since we'd need a string with 2^62 space-separated tokens
to trigger that (that's w/64-bit size_t; w/32-bit it'd be easier, but
still improbable).

Change-Id: If4521afe7b46110742991dd0ee234284ef8970df
BUG: 846755
Signed-off-by: Jim Meyering &lt;meyering@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3793
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gsyncd: don't dereference NULL upon failed realloc</title>
<updated>2012-07-13T21:05:28+00:00</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-07-13T16:38:52+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=a732e54aad9cff72097ff3020ef5c15ecd61b388'/>
<id>a732e54aad9cff72097ff3020ef5c15ecd61b388</id>
<content type='text'>
Fix typo: s/buf/*buf/ in test for failed *buf = realloc...
Spotted by coverity.

Change-Id: Ie1db59956e331c3691f4ed470a3fbaf2bd2e2055
BUG: 789278
Signed-off-by: Jim Meyering &lt;meyering@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3669
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix typo: s/buf/*buf/ in test for failed *buf = realloc...
Spotted by coverity.

Change-Id: Ie1db59956e331c3691f4ed470a3fbaf2bd2e2055
BUG: 789278
Signed-off-by: Jim Meyering &lt;meyering@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3669
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gsyncd: don't let a bogus config file make us read/write buf[-1]</title>
<updated>2012-07-12T02:14:23+00:00</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-06-20T09:33:10+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=4a505c0eb8736d75a677530a7789fc9bc03d4c28'/>
<id>4a505c0eb8736d75a677530a7789fc9bc03d4c28</id>
<content type='text'>
Change-Id: Ic55c28c572c1878f8a223ae2fd25d301a7ef0c12
BUG: 789278
Signed-off-by: Jim Meyering &lt;meyering@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3596
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Ic55c28c572c1878f8a223ae2fd25d301a7ef0c12
BUG: 789278
Signed-off-by: Jim Meyering &lt;meyering@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3596
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>localtime and ctime are not MT-SAFE</title>
<updated>2012-06-29T21:08:14+00:00</updated>
<author>
<name>Kaleb S. KEITHLEY</name>
<email>kkeithle@redhat.com</email>
</author>
<published>2012-06-13T13:13:04+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=5672e77d3102a990a2aa11e7e56ebfe6a0eee369'/>
<id>5672e77d3102a990a2aa11e7e56ebfe6a0eee369</id>
<content type='text'>
There are a number of nit-level issues throughout the source with
the use of localtime and ctime. While they apparently aren't causing
too many problems, apart from the one in bz 828058, they ought to be
fixed.  Among the "real" problems that are fixed in this patch:
 1) general localtime and ctime not MT-SAFE. There's a non-zero chance
    that another thread calling localtime (or ctime) will over-write
    the static data about to be used in another thread
 2) localtime(&amp; &lt;64-bit-type&gt;) or ctime(&amp; &lt;64-bit-type&gt;) generally
    not a problem on 64-bit or little-endian 32-bit. But even though
    we probably have zero users on big-ending 32-bit platforms, it's
    still incorrect.
 3) multiple nested calls passed as params. Last one wins, i.e. over-
    writes result of prior calls.
 4) Inconsistent error handling. Most of these calls are for logging,
    tracing, or dumping. I submit that if an error somehow occurs in
    the call to localtime or ctime, the log/trace/dump still should
    still occur.
 5) Appliances should all have their clocks set to UTC, and all log
    entries, traces, and dumps should use GMT.
 6) fix strtok(), change to strtok_r()

Other things this patch fixes/changes (that aren't bugs per se):
 1) Change "%Y-%m-%d %H:%M:%S" and similar to their equivalent shorthand,
    e.g. "%F %T"
 2) change sizeof(timestr) to sizeof timestr. sizeof is an operator,
    not a function. You don't use i +(32), why use sizeof(&lt;var&gt;).
    (And yes, you do use parens with sizeof(&lt;type&gt;).)
 3) change 'char timestr[256]' to 'char timestr[32]' where appropriate.
    Per-thread stack is limited. Time strings are never longer than ~20
    characters, so why waste 220+ bytes on the stack?

Things this patch doesn't fix:
 1) hodgepodge of %Y-%m-%d %H:%M:%S versus %Y/%m/%d-%H%M%S and other
    variations. It's not clear to me whether this ever matters, not to
    mention 3rd party log filtering tools may already rely on a
    particular format. Still it would be nice to have a single manifest
    constant and have every call to localtime/strftime consistently use
    the same format.

Change-Id: I827cad7bf53e57b69c0173f67abe72884249c1a9
BUG: 832173
Signed-off-by: Kaleb S. KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3568
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are a number of nit-level issues throughout the source with
the use of localtime and ctime. While they apparently aren't causing
too many problems, apart from the one in bz 828058, they ought to be
fixed.  Among the "real" problems that are fixed in this patch:
 1) general localtime and ctime not MT-SAFE. There's a non-zero chance
    that another thread calling localtime (or ctime) will over-write
    the static data about to be used in another thread
 2) localtime(&amp; &lt;64-bit-type&gt;) or ctime(&amp; &lt;64-bit-type&gt;) generally
    not a problem on 64-bit or little-endian 32-bit. But even though
    we probably have zero users on big-ending 32-bit platforms, it's
    still incorrect.
 3) multiple nested calls passed as params. Last one wins, i.e. over-
    writes result of prior calls.
 4) Inconsistent error handling. Most of these calls are for logging,
    tracing, or dumping. I submit that if an error somehow occurs in
    the call to localtime or ctime, the log/trace/dump still should
    still occur.
 5) Appliances should all have their clocks set to UTC, and all log
    entries, traces, and dumps should use GMT.
 6) fix strtok(), change to strtok_r()

Other things this patch fixes/changes (that aren't bugs per se):
 1) Change "%Y-%m-%d %H:%M:%S" and similar to their equivalent shorthand,
    e.g. "%F %T"
 2) change sizeof(timestr) to sizeof timestr. sizeof is an operator,
    not a function. You don't use i +(32), why use sizeof(&lt;var&gt;).
    (And yes, you do use parens with sizeof(&lt;type&gt;).)
 3) change 'char timestr[256]' to 'char timestr[32]' where appropriate.
    Per-thread stack is limited. Time strings are never longer than ~20
    characters, so why waste 220+ bytes on the stack?

Things this patch doesn't fix:
 1) hodgepodge of %Y-%m-%d %H:%M:%S versus %Y/%m/%d-%H%M%S and other
    variations. It's not clear to me whether this ever matters, not to
    mention 3rd party log filtering tools may already rely on a
    particular format. Still it would be nice to have a single manifest
    constant and have every call to localtime/strftime consistently use
    the same format.

Change-Id: I827cad7bf53e57b69c0173f67abe72884249c1a9
BUG: 832173
Signed-off-by: Kaleb S. KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3568
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>geo-rep / gsyncd.c: fix coverity fix</title>
<updated>2012-05-18T07:45:15+00:00</updated>
<author>
<name>Csaba Henk</name>
<email>csaba@redhat.com</email>
</author>
<published>2012-05-16T10:10:47+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=80a2d2752fcc363cba04a7421451cbe000edd6c5'/>
<id>80a2d2752fcc363cba04a7421451cbe000edd6c5</id>
<content type='text'>
gsyncd wrapper was segfaulting as coverity fix freed
up pointer at wrong place (after it was reused)

Instead of the apporach of the original coverity fix
that added elaborate control flow to hunt down potential
leaks, here we move the code over to static allocations
in place of (the not really necessary) dynamic ones.

Change-Id: Ida3855ff4a4f4371b350d27f858f129ceed51785
BUG: 789278
Signed-off-by: Csaba Henk &lt;csaba@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3345
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vijay@gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gsyncd wrapper was segfaulting as coverity fix freed
up pointer at wrong place (after it was reused)

Instead of the apporach of the original coverity fix
that added elaborate control flow to hunt down potential
leaks, here we move the code over to static allocations
in place of (the not really necessary) dynamic ones.

Change-Id: Ida3855ff4a4f4371b350d27f858f129ceed51785
BUG: 789278
Signed-off-by: Csaba Henk &lt;csaba@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3345
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vijay@gluster.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
