This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc v5+ generates code that cause segment faults
- From: Mason <slash dot tmp at free dot fr>
- To: mfuhrman at enetarch dot net
- Cc: GCC help <gcc-help at gcc dot gnu dot org>
- Date: Mon, 3 Oct 2016 11:25:59 +0200
- Subject: Re: gcc v5+ generates code that cause segment faults
- Authentication-results: sourceware.org; auth=none
- References: <380-220161013011136@M2W160.mail2web.com>
On 03/10/2016 02:01, mfuhrman@enetarch.net wrote:
> Dear GCC community,
>
> I have compiled this program under many different versions of Fedora
> using NetBeans 8.0.2 and 8.1, and have come to the conclusion that
> the segment faults are being created not by the OS, but by the
> compiler. Provided here are my findings thus far. I hope that someone
> can shed light on why this error is occurring, and provide a
> resolution.
>
> Mike,
>
> ======
>
> Fedora (version) gcc (version) - result of run:
>
> Fedora 18 - gcc 4.7.2 - ok
> Fedora 20 - gcc 4.8.3 - ok
> Fedora 23 - gcc 5.3.1 - segment fault
> Fedora 24 - gcc 6.2.1 - segment fault
>
> Source Code:
> https://github.com/enetarch/cJSON/
Have you tried making a small test case reproducing the issue?
$ wc *.c *.h
911 2651 24543 cJSON.c
46 191 1413 cJSON_Minify.c
743 2499 19894 cJSON_Parse2.c
391 1636 11194 cJSON_Parse.c
315 1153 8587 cJSON_Print.c
278 646 6126 cStream.c
92 206 1699 functions.c
133 494 4196 main.c
13 61 375 stubs.c
121 682 4304 cJSON.h
50 149 940 cStream.h
7 36 216 functions.h
35 91 570 stubs.h
3135 10495 84057 total
(Few people will have the time to look at 3000 lines of code
to find the issue.)
https://gcc.gnu.org/bugs/
Regards.