[Mesa-dev] [PATCH 2/4] nouveau/compiler: init the size and code variables to NULL/0
Martin Peres
martin.peres at linux.intel.com
Fri Jun 5 06:59:01 PDT 2015
On 05/06/15 16:53, Ilia Mirkin wrote:
>
> My recollection is that gcc's analysis is wrong. I can't look at the
> code now, but I hate patches that appease broken tools. Will take a
> look when I can get in front of a proper computer though.
>
Nope, GCC is not wrong here. nouveau_codegen can fail and, in this case,
it will not set size and code. Size is then used later on to display the
binary code.
By initing the size to 0 and the code to NULL, we make sure that we
won't execute the for loop displaying the binary code.
It really looks like a bug to me! You may however prefer me to fix
nouveau_codegen() instead. Your call!
More information about the mesa-dev
mailing list