public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Not Sure about best way to fix the Null Pointer
@ 2018-12-13 18:49 nick
  0 siblings, 0 replies; only message in thread
From: nick @ 2018-12-13 18:49 UTC (permalink / raw)
  To: GCC Development

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-12-13 18:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-13 18:49 Not Sure about best way to fix the Null Pointer nick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).