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

Re: gcc v5+ generates code that cause segment faults


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.


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