public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgomp/38724]  New: Segfault with allocatable component in private clause
@ 2009-01-04 19:41 kargl at gcc dot gnu dot org
  2009-01-04 19:42 ` [Bug libgomp/38724] " kargl at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: kargl at gcc dot gnu dot org @ 2009-01-04 19:41 UTC (permalink / raw)
  To: gcc-bugs

The attached code compiles but dies with a segmentation fault.  If the
omp directive is changed from

!$omp parallel private(k,cell)

to

!$omp parallel private(k)

the code executes.


-- 
           Summary: Segfault with allocatable component in private clause
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgomp
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kargl at gcc dot gnu dot org
  GCC host triplet: i386-unknown-freebsd8.0


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


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

* [Bug libgomp/38724] Segfault with allocatable component in private clause
  2009-01-04 19:41 [Bug libgomp/38724] New: Segfault with allocatable component in private clause kargl at gcc dot gnu dot org
@ 2009-01-04 19:42 ` kargl at gcc dot gnu dot org
  2009-01-04 19:43 ` kargl at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: kargl at gcc dot gnu dot org @ 2009-01-04 19:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from kargl at gcc dot gnu dot org  2009-01-04 19:41 -------
Created an attachment (id=17030)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17030&action=view)
openmp code showing segfault


-- 


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


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

* [Bug libgomp/38724] Segfault with allocatable component in private clause
  2009-01-04 19:41 [Bug libgomp/38724] New: Segfault with allocatable component in private clause kargl at gcc dot gnu dot org
  2009-01-04 19:42 ` [Bug libgomp/38724] " kargl at gcc dot gnu dot org
@ 2009-01-04 19:43 ` kargl at gcc dot gnu dot org
  2009-01-04 19:46 ` kargl at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: kargl at gcc dot gnu dot org @ 2009-01-04 19:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from kargl at gcc dot gnu dot org  2009-01-04 19:43 -------
gfc4x -g -o z -O -fopenmp gib.f90

(gdb) run ./z
Starting program: /usr/home/kargl/tmp/z ./z
[New LWP 100056]
[New LWP 100056]
          10          10
           1           1
Assertion failed: (arena != NULL), function arena_dalloc, file
/usr/src/lib/libc/stdlib/malloc.c, line 3843.
[New Thread 48103140 (LWP 100056)]

Program received signal SIGABRT, Aborted.
[Switching to Thread 48103140 (LWP 100056)]
0x0808792b in kill ()
(gdb) bt
#0  0x0808792b in kill ()
#1  0x080611e4 in raise ()
#2  0x080867b5 in abort ()
#3  0x0807ac91 in __assert ()
#4  0x08070c5d in idalloc ()
#5  0x08070df7 in free ()
#6  0x0804829c in MAIN__.omp_fn.0 (.omp_data_i=0x0) at gib.f90:31
#7  0x0804867b in test_omp () at gib.f90:29
#8  0x08048709 in main (argc=2, argv=0xbfbfe6f4)
    at ../../../gcc4x/libgfortran/fmain.c:21


-- 


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


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

* [Bug libgomp/38724] Segfault with allocatable component in private clause
  2009-01-04 19:41 [Bug libgomp/38724] New: Segfault with allocatable component in private clause kargl at gcc dot gnu dot org
  2009-01-04 19:42 ` [Bug libgomp/38724] " kargl at gcc dot gnu dot org
  2009-01-04 19:43 ` kargl at gcc dot gnu dot org
@ 2009-01-04 19:46 ` kargl at gcc dot gnu dot org
  2009-01-04 19:47 ` [Bug libgomp/38724] Segfault caused by derived-type " kargl at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: kargl at gcc dot gnu dot org @ 2009-01-04 19:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from kargl at gcc dot gnu dot org  2009-01-04 19:46 -------
Using gfortran 4.3.3, a segfault also occurs but the backtrace is different.

(gdb) run
Starting program: /usr/home/kargl/tmp/z 
[New LWP 100173]
[New Thread 48301140 (LWP 100173)]
          10          10
           1           1

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 48301140 (LWP 100173)]
0x481d5aa3 in malloc_usable_size () from /lib/libc.so.7
(gdb) bt
#0  0x481d5aa3 in malloc_usable_size () from /lib/libc.so.7
#1  0x481d63a7 in free () from /lib/libc.so.7
#2  0x080489c0 in MAIN__.omp_fn.0 (.omp_data_i=0x0) at gib.f90:31
#3  0x08048db2 in test_omp () at gib.f90:5
#4  0x08048e61 in main (argc=Error accessing memory address 0x0: Bad address.
)
    at ../.././..//gcc-4.3-20081120/libgfortran/fmain.c:21


-- 


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


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

* [Bug libgomp/38724] Segfault caused by derived-type with allocatable component in private clause
  2009-01-04 19:41 [Bug libgomp/38724] New: Segfault with allocatable component in private clause kargl at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2009-01-04 19:46 ` kargl at gcc dot gnu dot org
@ 2009-01-04 19:47 ` kargl at gcc dot gnu dot org
  2009-01-04 21:31 ` jakub at gcc dot gnu dot org
  2009-01-05  2:32 ` sgk at troutmask dot apl dot washington dot edu
  5 siblings, 0 replies; 8+ messages in thread
From: kargl at gcc dot gnu dot org @ 2009-01-04 19:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from kargl at gcc dot gnu dot org  2009-01-04 19:47 -------
Make the summary a little clear.


-- 

kargl at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Segfault with allocatable   |Segfault caused by derived-
                   |component in private clause |type with allocatable
                   |                            |component in private clause


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


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

* [Bug libgomp/38724] Segfault caused by derived-type with allocatable component in private clause
  2009-01-04 19:41 [Bug libgomp/38724] New: Segfault with allocatable component in private clause kargl at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2009-01-04 19:47 ` [Bug libgomp/38724] Segfault caused by derived-type " kargl at gcc dot gnu dot org
@ 2009-01-04 21:31 ` jakub at gcc dot gnu dot org
  2009-01-05  2:32 ` sgk at troutmask dot apl dot washington dot edu
  5 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-04 21:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jakub at gcc dot gnu dot org  2009-01-04 21:31 -------
OpenMP 3.0 doesn't cover types with allocatable components, so this is
undefined.  If anything IMHO we should reject any attempts to privatize
types with allocatable components, because it isn't clear what will OpenMP 4.0
require for them and if we now implement something different, it might be a
compatibility problem.


-- 


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


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

* [Bug libgomp/38724] Segfault caused by derived-type with allocatable component in private clause
  2009-01-04 19:41 [Bug libgomp/38724] New: Segfault with allocatable component in private clause kargl at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2009-01-04 21:31 ` jakub at gcc dot gnu dot org
@ 2009-01-05  2:32 ` sgk at troutmask dot apl dot washington dot edu
  5 siblings, 0 replies; 8+ messages in thread
From: sgk at troutmask dot apl dot washington dot edu @ 2009-01-05  2:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from sgk at troutmask dot apl dot washington dot edu  2009-01-05 02:32 -------
Subject: Re:  Segfault caused by derived-type with allocatable component in
private clause

On Sun, Jan 04, 2009 at 09:31:20PM -0000, jakub at gcc dot gnu dot org wrote:
> 
> ------- Comment #5 from jakub at gcc dot gnu dot org  2009-01-04 21:31 -------
> OpenMP 3.0 doesn't cover types with allocatable components, so this is
> undefined.  If anything IMHO we should reject any attempts to privatize
> types with allocatable components, because it isn't clear what will OpenMP 4.0
> require for them and if we now implement something different, it might be a
> compatibility problem.
> 

OK. Thanks for the info concerning OpenMP 3.0 and allocatable components.
I agree gfortran should reject the program until we have some idea of
the behavior with regards to OpenMP 4.0.


-- 


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


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

* [Bug libgomp/38724] Segfault caused by derived-type with allocatable component in private clause
       [not found] <bug-38724-4@http.gcc.gnu.org/bugzilla/>
@ 2013-08-12 12:46 ` janus at gcc dot gnu.org
  0 siblings, 0 replies; 8+ messages in thread
From: janus at gcc dot gnu.org @ 2013-08-12 12:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from janus at gcc dot gnu.org ---
see also
https://groups.google.com/forum/?fromgroups#!topic/comp.lang.fortran/vPs4MJamnCM


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

end of thread, other threads:[~2013-08-12 12:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-04 19:41 [Bug libgomp/38724] New: Segfault with allocatable component in private clause kargl at gcc dot gnu dot org
2009-01-04 19:42 ` [Bug libgomp/38724] " kargl at gcc dot gnu dot org
2009-01-04 19:43 ` kargl at gcc dot gnu dot org
2009-01-04 19:46 ` kargl at gcc dot gnu dot org
2009-01-04 19:47 ` [Bug libgomp/38724] Segfault caused by derived-type " kargl at gcc dot gnu dot org
2009-01-04 21:31 ` jakub at gcc dot gnu dot org
2009-01-05  2:32 ` sgk at troutmask dot apl dot washington dot edu
     [not found] <bug-38724-4@http.gcc.gnu.org/bugzilla/>
2013-08-12 12:46 ` janus 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).