Page 3 of 3 FirstFirst 123
Results 21 to 26 of 26

Thread: Valgrind Finds Thousands Of Potential Issues With Mesa

  1. #21
    Join Date
    Nov 2012
    Posts
    637

    Default

    Quote 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.

  2. #22
    Join Date
    Jun 2011
    Posts
    316

    Default

    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 at 04:25 AM.

  3. #23
    Join Date
    Oct 2012
    Location
    Washington State
    Posts
    512

    Default

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

  4. #24
    Join Date
    Jan 2012
    Location
    Houston
    Posts
    21

    Default

    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.

  5. #25
    Join Date
    Jan 2011
    Posts
    209

    Default

    Quote Originally Posted by peppercats View Post
    opensource drivers are trash, more at 11.
    Drivers are trash.

  6. #26
    Join Date
    Jan 2011
    Posts
    1,287

    Default

    Quote 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •