DragonFly BSD
DragonFly bugs List (threaded) for 2012-10
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

[DragonFlyBSD - Bug #1525] boehm-gc problems


From: Chris Turner via Redmine <bugtracker-admin@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 11 Oct 2012 10:58:54 -0700

Issue #1525 has been updated by Chris Turner.



This hacky patch fixes the non-threaded test on i386 running recent current (still gcc44) 
- basically, it looks like the #ifdef's haven't kept up with the dynamic linker / elf toolkit,
so alot of the byte / symbol mangling isn't needed and GC can use fancier builtin API's to
programatically access the stuff.

I'll clean this up later and take a crack at the threaded version.

Cheers,

- Chris


# diff -urw dyn_load.c.orig dyn_load.c
--- dyn_load.c.orig	2012-08-09 20:25:13.000000000 +0000
+++ dyn_load.c	2012-10-11 17:53:50.000000000 +0000
@@ -83,6 +83,12 @@
 #   define ELFSIZE ARCH_ELFSIZE
 #endif
 
+#if defined(__DragonFly__)
+#   include <elf.h>
+#   include <dlfcn.h>
+#   include <link.h>
+#endif
+
 #if defined(SCO_ELF) || defined(DGUX) || defined(HURD) \
     || (defined(__ELF__) && (defined(LINUX) || defined(FREEBSD) \
                              || defined(NETBSD) || defined(OPENBSD)))
@@ -398,7 +404,7 @@
 # pragma weak dl_iterate_phdr
 #endif
 
-#if (defined(FREEBSD) && __FreeBSD__ >= 7)
+#if (defined(FREEBSD) && __FreeBSD__ >= 7) && defined(__DragonFly__)
   /* On the FreeBSD system, any target system at major version 7 shall   */
   /* have dl_iterate_phdr; therefore, we need not make it weak as above. */
 # define HAVE_DL_ITERATE_PHDR
@@ -646,7 +652,8 @@
         return(0);
     }
     if( cachedResult == 0 ) {
-#     if defined(NETBSD) && defined(RTLD_DI_LINKMAP)
+/* HACK */
+#     if defined(__DragonFly__) && 1
         struct link_map *lm = NULL;
         if (!dlinfo(RTLD_SELF, RTLD_DI_LINKMAP, &lm))
             cachedResult = lm;

----------------------------------------
Bug #1525: boehm-gc problems
http://bugs.dragonflybsd.org/issues/1525

Author: Hasso Tepper
Status: New
Priority: Normal
Assignee: 
Category: 
Target version: 


Although devel/boehm-gc builds on DragonFly, there are problems - its own 
testuite doesn't run. The test for garbage collecting functionality either 
segfaults or hangs and if boehm-gc is built with threading support (making it 
treat DragonFly as FreeBSD), threading test does the same.

Note, that boehm-gc is used by in many software pieces (mainly various 
programming languages) and is probably onw of reasons why so many languages 
actually fail to run on DragonFly.

How to test:

fetch http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.1.tar.gz
tar zxf gc-7.1.tar.gz
cd gc-7.1
./configure --disable-threads
gmake
gmake check


-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]