public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/20613] New: __attribute__((malloc)) causes segfault in GCC 3.4
@ 2005-03-24  2:55 lkosewsk at uwaterloo dot ca
  2005-03-24  2:59 ` [Bug c/20613] " lkosewsk at uwaterloo dot ca
  2005-03-24  3:02 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: lkosewsk at uwaterloo dot ca @ 2005-03-24  2:55 UTC (permalink / raw)
  To: gcc-bugs

I have a very simple program here, namely:
----------
#include <malloc.h>

void __attribute__((malloc)) intersect(int list)
{
    int* shite = (int *)malloc(sizeof(int));
}

int main()
{
    intersect(5);
}
----------

Attempting to compile this using GCC 3.4 with `gcc bug.c` causes a segmentation
fault.

Output of `gcc -v --save-temps bug.c`:
----------
Reading specs from /usr/lib/gcc/i486-linux/3.4.4/specs
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr
--libexecdir=/usr/lib --with-gxx-include-dir=/usr/include/c++/3.4
--enable-shared --with-system-zlib --enable-nls --without-included-gettext
--program-suffix=-3.4 --enable-__cxa_atexit --enable-libstdcxx-allocator=mt
--enable-clocale=gnu --enable-libstdcxx-debug --enable-java-gc=boehm
--enable-java-awt=gtk --disable-werror i486-linux
Thread model: posix
gcc version 3.4.4 20050209 (prerelease) (Debian 3.4.3-9ubuntu3)
 /usr/lib/gcc/i486-linux/3.4.4/cc1 -E -quiet -v bug.c -mtune=i486 -o bug.i
ignoring nonexistent directory
"/usr/lib/gcc/i486-linux/3.4.4/../../../../i486-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib/gcc/i486-linux/3.4.4/include
 /usr/include
End of search list.
 /usr/lib/gcc/i486-linux/3.4.4/cc1 -fpreprocessed bug.i -quiet -dumpbase bug.c
-mtune=i486 -auxbase bug -version -o bug.s
GNU C version 3.4.4 20050209 (prerelease) (Debian 3.4.3-9ubuntu3) (i486-linux)
	compiled by GNU C version 3.4.4 20050209 (prerelease) (Debian 3.4.3-9ubuntu3).
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64543
bug.c: In function `main':
bug.c:10: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-3.4/README.Bugs>.
----------

This interface for bug submissions is horrible (no offense).  If I can figure
out how to attach files to this bug, I will attach the .i file.

-- 
           Summary: __attribute__((malloc)) causes segfault in GCC 3.4
           Product: gcc
           Version: 3.4.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: lkosewsk at uwaterloo dot ca
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug c/20613] __attribute__((malloc)) causes segfault in GCC 3.4
  2005-03-24  2:55 [Bug c/20613] New: __attribute__((malloc)) causes segfault in GCC 3.4 lkosewsk at uwaterloo dot ca
@ 2005-03-24  2:59 ` lkosewsk at uwaterloo dot ca
  2005-03-24  3:02 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: lkosewsk at uwaterloo dot ca @ 2005-03-24  2:59 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lkosewsk at uwaterloo dot ca  2005-03-24 02:58 -------
Created an attachment (id=8442)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8442&action=view)
The attached .i file and original source.

This contains the original source which produced the error, as well as the .i
file which I get out of it.

-- 


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


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

* [Bug c/20613] __attribute__((malloc)) causes segfault in GCC 3.4
  2005-03-24  2:55 [Bug c/20613] New: __attribute__((malloc)) causes segfault in GCC 3.4 lkosewsk at uwaterloo dot ca
  2005-03-24  2:59 ` [Bug c/20613] " lkosewsk at uwaterloo dot ca
@ 2005-03-24  3:02 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-24  3:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-24 03:02 -------
Yes but this is a dup of bug 15443.  A simple seach would have found it

*** This bug has been marked as a duplicate of 15443 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


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

end of thread, other threads:[~2005-03-24  3:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-24  2:55 [Bug c/20613] New: __attribute__((malloc)) causes segfault in GCC 3.4 lkosewsk at uwaterloo dot ca
2005-03-24  2:59 ` [Bug c/20613] " lkosewsk at uwaterloo dot ca
2005-03-24  3:02 ` 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).