This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/56881] Miscompilation (optimisation failure?) causing NULL dereference and segfault at runtime
- From: "jasonwucj at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 09 Apr 2013 09:52:35 +0000
- Subject: [Bug other/56881] Miscompilation (optimisation failure?) causing NULL dereference and segfault at runtime
- Auto-submitted: auto-generated
- References: <bug-56881-4 at http dot gcc dot gnu dot org/bugzilla/>
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.