This is the mail archive of the gcc-bugs@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]

[Bug other/56881] Miscompilation (optimisation failure?) causing NULL dereference and segfault at runtime


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56881

Chung-Ju Wu <jasonwucj at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jasonwucj at gmail dot com

--- Comment #1 from Chung-Ju Wu <jasonwucj at gmail dot com> 2013-04-09 09:52:35 UTC ---
(In reply to comment #0)
> 
>   hs1 = (Hideset)domalloc(len*sizeof(Hideset));
>   memmove(hs1, nhs, len*sizeof(Hideset));
>   hidesets[nhidesets] = hs1;
> 

IMHO, if domalloc() does return NULL for some cases,
having NULL-checking statement before/inside memmove is required.


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