public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/53004] New: Segmentation fault can be overcome with dummy predefined declaration
@ 2012-04-16  8:53 gursoyturan at iyte dot edu.tr
  2012-04-16  9:47 ` [Bug c/53004] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: gursoyturan at iyte dot edu.tr @ 2012-04-16  8:53 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53004
           Summary: Segmentation fault can be overcome with dummy
                    predefined declaration
    Classification: Unclassified
           Product: gcc
           Version: 4.5.2
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: gursoyturan@iyte.edu.tr


The program compiles, but only runs if a dummy predefined variable is inserted
as below

float dummy=1;


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

* [Bug c/53004] Segmentation fault can be overcome with dummy predefined declaration
  2012-04-16  8:53 [Bug c/53004] New: Segmentation fault can be overcome with dummy predefined declaration gursoyturan at iyte dot edu.tr
@ 2012-04-16  9:47 ` pinskia at gcc dot gnu.org
  2012-04-16  9:58 ` gursoyturan at iyte dot edu.tr
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-04-16  9:47 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2012-04-16
     Ever Confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-04-16 09:46:46 UTC ---
There is no attached source code.
Can you attach the source code where you are having the seg fault at runtime?

I bet you have a buffer overflow in your code though.


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

* [Bug c/53004] Segmentation fault can be overcome with dummy predefined declaration
  2012-04-16  8:53 [Bug c/53004] New: Segmentation fault can be overcome with dummy predefined declaration gursoyturan at iyte dot edu.tr
  2012-04-16  9:47 ` [Bug c/53004] " pinskia at gcc dot gnu.org
@ 2012-04-16  9:58 ` gursoyturan at iyte dot edu.tr
  2012-04-16 10:37 ` schwab@linux-m68k.org
  2012-04-16 10:48 ` manu at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: gursoyturan at iyte dot edu.tr @ 2012-04-16  9:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from gursoyturan at iyte dot edu.tr 2012-04-16 09:57:08 UTC ---
Created attachment 27166
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27166
C-Source code

C-source code


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

* [Bug c/53004] Segmentation fault can be overcome with dummy predefined declaration
  2012-04-16  8:53 [Bug c/53004] New: Segmentation fault can be overcome with dummy predefined declaration gursoyturan at iyte dot edu.tr
  2012-04-16  9:47 ` [Bug c/53004] " pinskia at gcc dot gnu.org
  2012-04-16  9:58 ` gursoyturan at iyte dot edu.tr
@ 2012-04-16 10:37 ` schwab@linux-m68k.org
  2012-04-16 10:48 ` manu at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: schwab@linux-m68k.org @ 2012-04-16 10:37 UTC (permalink / raw)
  To: gcc-bugs

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

Andreas Schwab <schwab@linux-m68k.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID

--- Comment #3 from Andreas Schwab <schwab@linux-m68k.org> 2012-04-16 10:37:17 UTC ---
You are using an uninitialized pointer.


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

* [Bug c/53004] Segmentation fault can be overcome with dummy predefined declaration
  2012-04-16  8:53 [Bug c/53004] New: Segmentation fault can be overcome with dummy predefined declaration gursoyturan at iyte dot edu.tr
                   ` (2 preceding siblings ...)
  2012-04-16 10:37 ` schwab@linux-m68k.org
@ 2012-04-16 10:48 ` manu at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: manu at gcc dot gnu.org @ 2012-04-16 10:48 UTC (permalink / raw)
  To: gcc-bugs

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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu.org

--- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-04-16 10:48:28 UTC ---
And GCC tells you so:

manuel@gcc12:~$ ~/trunk/186353M/build/gcc/cc1 -Wall tmp.c 
tmp.c:3:6: warning: return type of ‘main’ is not ‘int’ [-Wmain]
 void main()
      ^
tmp.c: In function ‘main’:
tmp.c:8:8: warning: ‘prod_vg’ is used uninitialized in this function
[-Wuninitialized]
   multg(prod_vg);
        ^

Now that -Wuninitialized is separated from -Wmaybe-uninitialized, maybe it is
time to enable it by default.


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

end of thread, other threads:[~2012-04-16 10:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-16  8:53 [Bug c/53004] New: Segmentation fault can be overcome with dummy predefined declaration gursoyturan at iyte dot edu.tr
2012-04-16  9:47 ` [Bug c/53004] " pinskia at gcc dot gnu.org
2012-04-16  9:58 ` gursoyturan at iyte dot edu.tr
2012-04-16 10:37 ` schwab@linux-m68k.org
2012-04-16 10:48 ` manu at gcc dot gnu.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).