This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
gcc v5+ generates code that cause segment faults
- From: "mfuhrman at enetarch dot net" <mfuhrman at enetarch dot net>
- To: gcc-help at gcc dot gnu dot org
- Date: Sun, 2 Oct 2016 20:01:01 -0400
- Subject: gcc v5+ generates code that cause segment faults
- Authentication-results: sourceware.org; auth=none
- Authentication-results: antispamcloud.com; auth=pass smtp.auth=168.144.250.0/24 at xsmtpout dot mail2web dot com
- Reply-to: mfuhrman at enetarch dot net
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