Thread overview
[Issue 72] valgrind: use of unitialized values in the gcx module
Jun 11, 2007
d-bugmail
Nov 07, 2010
Walter Bright
Nov 07, 2010
Brad Roberts
Nov 08, 2010
Walter Bright
June 11, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=72


jason.james.house@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason.james.house@gmail.com




------- Comment #4 from jason.james.house@gmail.com  2007-06-11 09:06 -------
This bug I submitted to gdc may be of interest: https://sourceforge.net/tracker/?func=detail&atid=791252&aid=1734477&group_id=154306

Just calling the garbage collector is enough to generate valgrind issues.  Does this issues show up with dmd and gdc both?  The problems I've run into have only shown up when using gdc.  I haven't, however, tested this issue with dmd. Here's a small piece of the post:

$ cat ./valgrindTest.d
module valgrindTest;
import std.gc;

int main (char[][] args){
std.gc.fullCollect();
return 0;
}


-- 

November 07, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=72


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com


--- Comment #5 from Walter Bright <bugzilla@digitalmars.com> 2010-11-07 14:38:03 PST ---
I've never been able to find anything actually wrong with the gc code in question here.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 07, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=72


Brad Roberts <braddr@puremagic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |braddr@puremagic.com


--- Comment #6 from Brad Roberts <braddr@puremagic.com> 2010-11-07 14:49:08 PST ---
I looked at this one a long time ago.  I think it should be closed as won't fix.  The problem, as I remember it, is that the gc walks the stack.  The stack isn't fully dense, so there's blocks in it that have never had a value assigned.  So, when the gc walks those blocks it complains that their values are indeterminate.

Two ways to fix it, that I can see:
  1) always initialize empty stack slots -- cost performance
  2) teach the gc to be precise about it's stack scanning -- complex

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 08, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=72


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX


--- Comment #7 from Walter Bright <bugzilla@digitalmars.com> 2010-11-07 16:31:00 PST ---
Makes sense. Will mark as won't fix.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------