This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Not Sure about best way to fix the Null Pointer
- From: nick <xerofoify at gmail dot com>
- To: GCC Development <gcc at gcc dot gnu dot org>
- Date: Thu, 13 Dec 2018 13:49:21 -0500
- Subject: 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