public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: Martin Kahlert <martin.kahlert@infineon.com>
To: java@gcc.gnu.org
Subject: I need help with gc
Date: Fri, 26 Apr 2002 03:00:00 -0000	[thread overview]
Message-ID: <20020426105515.A13957@keksy.muc.infineon.com> (raw)

Hi!
i get a SegFault on Linux in 
#0  GC_mark_from (mark_stack_top=0x85c5000, mark_stack=0x85c5000,
mark_stack_limit=0x85cd000) at ../../../gcc-3.1-20020423/boehm-gc/mark.c:654
654               deferred = *limit;
(gdb) p limit
$1 = (word *) 0x8569048

This is an address inside a fortran common block which is layed out like this:

      COMMON /BLANK/ NODPRE,NODPLC,NODPST
      INTEGER NODPRE(4096), NODPLC(2048), NODPST(2048)
      REAL*8 VALUE(1024)
      COMPLEX*16 ZVALUE(512)
      CHARACTER CHRARR(8192)

      EQUIVALENCE (VALUE(1),NODPLC(1),ZVALUE(1),CHRARR(1))
C

and also addressed from C by
extern struct
{
    int padding_pre[4096];
    union
    {
        char    carray[8192];
        int     iarray[2048];
        double  darray[1024];
        Complex zarray[512];
    } userdata;
    int padding_post[2048];
} blank_;

In the application blank.padding_pre = 0x8566220.
Thus limit is somewhere in the middle of NODPRE or blank_padding_pre.
Is this an error?  

I found that because i mprotected a region around NODPLC / blank_userdata
 with PROT_NONE in order to catch errors in my code.

The full stack frame is this:
#0  GC_mark_from (mark_stack_top=0x85c5000, mark_stack=0x85c5000, mark_stack_limit=0x85cd000) at ../../../gcc-3.1-20020423/boehm-gc/mark.c:654
#1  0x40642ad2 in GC_mark_some (cold_gc_frame=0x8568e50 "") at ../../../gcc-3.1-20020423/boehm-gc/mark.c:289
#2  0x4063f025 in GC_stopped_mark (stop_func=0x8568e50 <blank_+11312>) at ../../../gcc-3.1-20020423/boehm-gc/alloc.c:489
#3  0x4063ed9c in GC_try_to_collect_inner (stop_func=0x4063e950 <GC_never_stop_func>) at ../../../gcc-3.1-20020423/boehm-gc/alloc.c:350
#4  0x40645105 in GC_init_inner () at ../../../gcc-3.1-20020423/boehm-gc/misc.c:673
#5  0x406410d4 in GC_init_gcj_malloc (mp_index=0, mp=0x1fc) at ../../../gcc-3.1-20020423/boehm-gc/gcj_mlc.c:60
#6  0x4063e452 in _Jv_InitGC() () at ../../../gcc-3.1-20020423/libjava/boehm.cc:465
#7  0x405ca741 in _Jv_CreateJavaVM(void*) () at ../../../gcc-3.1-20020423/libjava/prims.cc:892
#8  0x405cd665 in JNI_CreateJavaVM (vm=0x1fc, penv=0x1fc, args=0xbfff9cf0) at ../../../gcc-3.1-20020423/libjava/jni.cc:2262
#9  0x0805cbf6 in loadJVM () at c_code/vti.c:660
....

Is this behaviour correct and i just cannot mprotect static data and use the gc or is it an error?

Thanks for any help,
Martin.

-- 
The early bird catches the worm. If you want something else for       
breakfast, get up late

             reply	other threads:[~2002-04-26  8:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-26  3:00 Martin Kahlert [this message]
2002-04-26 11:41 Boehm, Hans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020426105515.A13957@keksy.muc.infineon.com \
    --to=martin.kahlert@infineon.com \
    --cc=java@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).