GNU bug report logs - #26628
[PATCH] Fix memory leak of cwd string in emacsclient

Previous Next

Package: emacs;

Reported by: Anders Waldenborg <anders <at> 0x63.nu>

Date: Sun, 23 Apr 2017 19:24:01 UTC

Severity: minor

Tags: fixed, patch

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: npostavs <at> users.sourceforge.net
Cc: Anders Waldenborg <anders <at> 0x63.nu>, 26628 <at> debbugs.gnu.org
Subject: bug#26628: [PATCH] Fix memory leak of cwd string in emacsclient
Date: Wed, 31 May 2017 23:30:53 -0700
[Message part 1 (text/plain, inline)]
Generally speaking we don't bother freeing storage just before program exit 
merely to pacify AddressSanitizer, as that makes the program less efficient and 
is contrary to the goal of leak checking which is to increase efficiency. Here, 
though, we can free storage earlier, and this might have a point since the 
storage can get reused. So I installed the attached further patch.

> I'm aware that I can set ASAN_OPTIONS=detect_leaks=0 in the environment

It might not hurt to do that, if only to prevent our hassling with false alarms.
[0001-Free-cwd-when-no-longer-needed.txt (text/plain, attachment)]

This bug report was last modified 7 years and 359 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.