Announcement

Collapse
No announcement yet.

Valgrind Finds Thousands Of Potential Issues With Mesa

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    Originally posted by peppercats View Post
    opensource drivers are trash, more at 11.
    They're best thing that could ever happen in the computer world (just after GPL Linux). It seems you forgot about non graphic drivers, otherwise you wouldn't be writing such trash.

    Comment


    • #22
      I used to think that all Valgrind errors were bugs too..
      Until I started running valgrind on the popular GNU tools like ps, ls, top, etc and found Valgrind errors that appeared to be memory leaks.

      Turned out, that Valgrind was complaining about some memory that wasn't explicitly being freed in code, but it doesn't matter because the memory is automatically freed when the process terminates. Adding code to explicitly free that memory would do nothing but delay the process's termination of a process that's ready to terminate, so the bug reports were closed and I learned to take Valgrind problems a lot less seriously.

      Valgrind is useful in tracking down problems when you know there is a problem, but can also generate a massive amount of false positives and the few positives that it does have will often be multipled by 10,000x for the same line of code.

      Edit: And also as mentioned, the kernel has got IO controlls that work with memory in ways that Valgrind doesn't know about / understand properly and so will result in a large number of false positives.. You need to filter out all the possible false positives from the ioctrls first, otherwise you're not really helping much. There's no way a dev is going to go through all those valgrind errors manually to find out if they're duplicate or not, or invalid or not. You should do it for them to narrow down the problem to code that actually might have a problem. It's part of the process of making a good bug report. Making good bug reports with Valgrind is hard unless you understand it well, RTFM, filter out the massive amount of false positives and then try again.
      Last edited by Sidicas; 08-15-2013, 03:25 AM.

      Comment


      • #23
        Clang Static Analyzer and Valgrind are two solid tools to flush out the bugs.

        Comment


        • #24
          eeh, after spending much time going over Mesa code, I think most of this comes from the over-abundant upcasting and slicing in the Mesa code base. GL is a really tricky beast to wrangle.

          Comment


          • #25
            Originally posted by peppercats View Post
            opensource drivers are trash, more at 11.
            Drivers are trash.

            Comment


            • #26
              Originally posted by WorBlux View Post
              Drivers are trash.
              Trash is trash. Trash.

              But seriously. Trash.

              I hope they don't ban me. Trash trash trash.

              Comment

              Working...
              X