Home | News | Download | Packages | Forum | Wiki | Github

Invalid writes in i965_dri.so?


#1

In all probability I’m driving valgrind wrong… so easy to get a false positive but…

valgrind ./chiptest > err.txt 2>&1

take for example

==6925== Invalid write of size 4
==6925== at 0x9B567D2: ??? (in /usr/lib/xorg/modules/drivers/i965_dri.so)
==6925== by 0x9B37E92: ??? (in /usr/lib/xorg/modules/drivers/i965_dri.so)
==6925== by 0x417249: render (chiptest.c:198)
==6925== by 0x417200: main (chiptest.c:178)
==6925== Address 0x7ff24e3ce118 is not stack’d, malloc’d or (recently) free’d

chiptest.c:198
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

So its not like I’m even passing dodgy pointers with this function :wink:

is there a way to suppress these errors - there are so many, I can’t see the wood for the trees

is this even a problem with i965_dri.so ?


#2

sry for necromancy, but im getting this too.


#3

its because you are eating toads and stabbing dolls in they eye’s with pins… oh wait you mean the thread…

afaict this is probably some kind of false positive

if you run valgrind thus:

valgrind --gen-suppressions=all --suppressions=valgind.suppression.txt myApp

it will spew out rules for each issue it encounters the ones you can do nothing about (if they exist) in the depth of a video driver just add to valgind.suppression.txt (or whatever you want to call is)

see makefile and suppression file example (intel gpu) here https://github.com/chriscamacho/bulletCapi/blob/master/GL3v3/Makefile and https://github.com/chriscamacho/bulletCapi/blob/master/GL3v3/valgind.suppression.txt

hth


#4

yess i just noticed that!

i also found some people talking about building libdrm with valgrind support (which void explicitly disables), but it didnt work for me.

just in case someone hits this thread, my suppressions file looks liek this:

{
        mesalixo2
        Memcheck:Addr2
        ...
        obj:*/i965_dri.so
}
{
        mesalixo4
        Memcheck:Addr4
        ...
        obj:*/i965_dri.so
}
{
        mesalixo8
        Memcheck:Addr8
        ...
        obj:*/i965_dri.so
}

and you can also automatically load it on your ~/.valgrindrc file:

--suppressions=/home/rogi/.valgrind.supp

thank you very much!
<3