gcc v5+ generates code that cause segment faults

mfuhrman@enetarch.net mfuhrman@enetarch.net
Sun Oct 2 23:57:00 GMT 2016


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/

Compiled Debug Files and HexDumps
/dist/Debug/GNU-Linux-x86/cjson_06.fed18	
/dist/Debug/GNU-Linux-x86/cjson_06.fed24.txt	
/dist/Debug/GNU-Linux-x86/cjson_06.fed18.txt	
/dist/Debug/GNU-Linux-x86/cjson_06.fed24

The original source code for cJSON is from:
https://github.com/DaveGamble/cJSON




--------------------------------------------------------------------
mail2web - Check your email from the web at
https://link.mail2web.com/mail2web




More information about the Gcc-help mailing list