Displaying 3 results from an estimated 3 matches for "num_immedi".
2015 Aug 27
2
gallium state tracker calls calloc for 0 sizes arrays ?
...f (proginfo->Parameters) {
t->constants = (struct ureg_src *)
calloc(proginfo->Parameters->NumParameters, sizeof(t->constants[0]));
And if I protect the code against that one, another one at 5618:
t->immediates = (struct ureg_src *)
calloc(program->num_immediates, sizeof(struct ureg_src));
With the regular glibc malloc these both succeed as it actually
returns a valid memory address (posix says it may also return NULL)
I believe that the fragment program in question comes from:
src/mesa/main/state.c update_program() and then from the
else if (ct...
2015 Aug 27
2
[Mesa-dev] gallium state tracker calls calloc for 0 sizes arrays ?
...t ureg_src *)
>> calloc(proginfo->Parameters->NumParameters,
>> sizeof(t->constants[0]));
>>
>> And if I protect the code against that one, another one at 5618:
>>
>> t->immediates = (struct ureg_src *)
>> calloc(program->num_immediates, sizeof(struct ureg_src));
>>
>> With the regular glibc malloc these both succeed as it actually
>> returns a valid memory address (posix says it may also return NULL)
>>
>> I believe that the fragment program in question comes from:
>>
>> src/mesa/main...
2015 Aug 27
3
[Mesa-dev] gallium state tracker calls calloc for 0 sizes arrays ?
...->Parameters->NumParameters,
>>>> sizeof(t->constants[0]));
>>>>
>>>> And if I protect the code against that one, another one at 5618:
>>>>
>>>> t->immediates = (struct ureg_src *)
>>>> calloc(program->num_immediates, sizeof(struct ureg_src));
>>>>
>>>> With the regular glibc malloc these both succeed as it actually
>>>> returns a valid memory address (posix says it may also return NULL)
>>>>
>>>> I believe that the fragment program in question com...