summaryrefslogtreecommitdiffstats
path: root/INSTALL
diff options
context:
space:
mode:
authorEmmanuel Dreyfus <manu@netbsd.org>2012-05-25 06:39:48 +0200
committerAnand Avati <avati@redhat.com>2012-05-24 21:51:12 -0700
commitc97c3136bd2932705bf30b354417008b4e0eff2b (patch)
tree076a2aacdde88e7ffe568cb1d020a0e86be4b97a /INSTALL
parentc40b73fc453caf123e806adebac6c69b003bc636 (diff)
Switch to GNU basename_r() and dirname_r()
BSD basename() and dirname() return static storage, hence they are not thread safe, while GNU flavors are. glusterfs assumes the GNU behavior. As a fix, we added a BSD-derived, thread-safe version of basename_r() and dirname_r() in contrib/libgen. BSD systems can use it instead of their built in versions. Unfortunately, there are more reliance on GNU behavior in glusterfs. There are place where free() is called on static storage returned by basename(), place where a second call to dirname() overwrite the string obtained once, and so forth. Each of these problems can be fixed, but it is likely to be a pandora box. We need to accept that glusterfs heavily rely on GNU behavior, and switch contrib/libgen's basename_r() and dirname_r() to the GNU version. This change does just that. BUG: 764655 Change-Id: Id874b9c7aacd9aa3a7a4bd6a92a9633f5b2d6ac0 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.com/3430 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'INSTALL')
0 files changed, 0 insertions, 0 deletions