Concurrent Versions System - Patches: patch #5911, CVS 1.12.13 - fixed memory leaks...
You are not allowed to post comments on this tracker with your current authentication level.
patch #5911: CVS 1.12.13 - fixed memory leaks errors reported by valgrind/memcheck
Submitter: | None | ||
Submitted: | Wed 02 May 2007 02:51:05 PM UTC | ||
Category: | None | Priority: | 5 - Normal |
Status: | Done | Privacy: | Public |
Assigned to: | mdb | Originator Email: | -email is unavailable- |
Open/Closed: | Closed | Fixed Release: | None |
Fixed Feature Release: | 1.12.14 |
Wed 06 Jun 2007 11:39:10 AM UTC, comment #4: |
Yaron Yogev <yyogev> |
Mon 04 Jun 2007 08:48:35 AM UTC, comment #3: important:
|
Yaron Yogev <yyogev> |
Wed 30 May 2007 11:22:29 PM UTC, comment #2: I added a --valgrind option to sanity.sh to allow more leaks
|
Mark D. Baushke <mdb> |
Sat 26 May 2007 07:04:50 PM UTC, comment #1: The patch to add.c is okay, but would be more efficient if put
|
Mark D. Baushke <mdb> |
Wed 02 May 2007 02:51:05 PM UTC, original submission:
sanity.sh tests run from valgrind (with default tool: memcheck) show memory leaks.
|
Anonymous |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 10 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2007-06-06 | yyogev | Attached File | - | Added patch_cvs_fix_memory_leaks_1_12_13_fix_hrecs_memset, #12966 | |
2007-06-04 | yyogev | Attached File | - | Added patch_cvs_fix_memory_leaks_1_12_13_b1.diff, #12944 | |
2007-05-30 | mdb | Status | None | Done | |
Assigned to | None | mdb | |||
Open/Closed | Open | Closed | |||
Fixed Feature Release | None | 1.12.14 | |||
2007-05-30 | mdb | Attached File | - | Added valgrind.patch, #12906 | |
2007-05-02 | None | Attached File | - | Added cvs_fix_memory_leaks_1_12_13, #12667 | |
Attached File | - | Added valgrind-cvs, #12668 | |||
Attached File | - | Added cvs_sanity_valgrind_1_12_13.diff, #12669 |
Powered by Savane 3.13-f8d8.
Corresponding source code
regarding calls to getgrnam():
'man getgrnam' on my Linux PC (Intel-based, Linux kernel 2.6.18.3) states:
'The return value may point to static area'.
since valgrind shows many leaks coming from this function call in my environment, apparently it is not doing static allocation in this environment.
I think that finding in the configure script how it works is possible but not easy to implement, so it's not worth it.
memset() after xnrealloc in history.c is wrong indeed.
however, zeroing still needs to be done on newly allocated memory for hrecs, so I need to rewrite that bit to zero just the new elements of the array. so the correct form should be:
memset (hrec_head + (hrec_max - HREC_INCREMENT) sizeof(struct hrec), 0, HREC_INCREMENT sizeof(struct hrec));
attached is yet another patch file that fixes this.
(file #12966)