This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Not Sure about best way to fix the Null Pointer


Greetings All,

I seem to have probably traced this bug down but am not sure what is the best way 
to fix it being new here:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88395#add_comment

Seems the issue is in va_heap::reserve in vec.h as we aren't checking if v is 
equal to N like in vaheap::release. Seems a few odd to me that it's not 
checking that as it calculates a allocation afterwards and seems more than
likely it crashes due to v being Null. I am assuming this is the proper fix
but let me know if I am fixing something like the allocation is known
to be good. 

Before the vec_prefix::calculate_allocation call do:

if (v == NULL)
return

Thanks,

Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]