From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32319 invoked by alias); 26 Apr 2002 08:55:26 -0000 Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org Received: (qmail 32191 invoked from network); 26 Apr 2002 08:55:19 -0000 Received: from unknown (HELO david.siemens.de) (192.35.17.14) by sources.redhat.com with SMTP; 26 Apr 2002 08:55:19 -0000 Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by david.siemens.de (8.11.6/8.11.6) with ESMTP id g3Q8tH704913 for ; Fri, 26 Apr 2002 10:55:17 +0200 (MEST) Received: from mail-l.muc.infineon.com (mail-l.muc.infineon.com [172.29.174.210]) by mail1.siemens.de (8.11.6/8.11.6) with ESMTP id g3Q8tHW02049 for ; Fri, 26 Apr 2002 10:55:17 +0200 (MEST) Received: from keksy.muc.infineon.com (keksy [172.29.174.218]) by mail-l.muc.infineon.com with ESMTP id g3Q8tGGk029983 for ; Fri, 26 Apr 2002 10:55:16 +0200 (MET DST) Received: (from kahlert@localhost) by keksy.muc.infineon.com (8.11.3/8.11.3/SuSE Linux 8.11.1-0.5) id g3Q8tFN14373 for java@gcc.gnu.org; Fri, 26 Apr 2002 10:55:15 +0200 Date: Fri, 26 Apr 2002 03:00:00 -0000 From: Martin Kahlert To: java@gcc.gnu.org Subject: I need help with gc Message-ID: <20020426105515.A13957@keksy.muc.infineon.com> Reply-To: martin.kahlert@infineon.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-SW-Source: 2002-04/txt/msg00366.txt.bz2 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 ) at ../../../gcc-3.1-20020423/boehm-gc/alloc.c:489 #3 0x4063ed9c in GC_try_to_collect_inner (stop_func=0x4063e950 ) 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