public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/21536] New: C99 array of variable length use causes segmentation fault
@ 2005-05-12 18:01 shane256 at hotmail dot com
  2005-05-12 18:05 ` [Bug c/21536] " shane256 at hotmail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: shane256 at hotmail dot com @ 2005-05-12 18:01 UTC (permalink / raw)
  To: gcc-bugs

Platform: Linux GCC x86.  I have generated a test case where the code I have 
using a C99 array with variable length causes a segmentation fault.  The thing 
is, if I comment out an unrelated line of code that is impossible to be 
executed and not in the execution pathway (it's in the body of an if statement 
that can not be executed because of the conditional anyway and added to that, I 
put a return 0; in front of the line of code so if it did happen to get in 
there, it would return before executing the line of code) the segmentation 
fault does not happen.  Also, if I don't do that, but I do comment out an 
unused automatic variable defined in the main() function (which calls the test 
function), the segmentation fault does not happen.  The test code is ~40 lines 
long and contains all the temporary files requested, the version information, 
and a more detailed explanation of how to reproduce the segmentation fault.  
This is all in a tar.gz file that you can get from 
http://www.sinistershane.net/~shane/files/testcase.tar.gz

The segv appears in both x86_64 and x86 (32bit) executables.

-- 
           Summary: C99 array of variable length use causes segmentation
                    fault
           Product: gcc
           Version: 3.3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: shane256 at hotmail dot com
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21536


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-06-01 19:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-12 18:01 [Bug c/21536] New: C99 array of variable length use causes segmentation fault shane256 at hotmail dot com
2005-05-12 18:05 ` [Bug c/21536] " shane256 at hotmail dot com
2005-05-12 18:06 ` pinskia at gcc dot gnu dot org
2005-05-12 18:08 ` [Bug c/21536] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-05-19 17:22 ` mmitchel at gcc dot gnu dot org
2005-05-27 17:14 ` jakub at gcc dot gnu dot org
2005-06-01 10:23 ` cvs-commit at gcc dot gnu dot org
2005-06-01 10:36 ` cvs-commit at gcc dot gnu dot org
2005-06-01 19:00 ` [Bug c/21536] [3.4 " pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).