Date: Tue, 26 Feb 2002 19:09:05 +0100 (CET) From: Martin Blapp <mb@imp.ch> To: <freebsd-current@freebsd.org> Subject: libc_r patches and some questions Message-ID: <20020226190200.A26547-100000@levais.imp.ch>
next in thread | raw e-mail | index | archive | help
Hi all,
I've recieved patches from Carlos Fernando Assis Paniago <pan@cnpm.embrapa.br>
to get Openoffice Build 641 running.
Since I'm not familiar, I hope someone else can look at them and point me
to the right direction to have a working OpenOffice port.
> This patch solves a readdir_r bug that stop after 240 files in a directory.
> It is not the ideal solution, but I don't know where the system alloc are for
> this entry. I know that if I copy only the data that exist it works if a copy
> the whole struc if bumps a error.
--- lib/libc/gen/readdir.c.orig Wed Feb 6 09:37:15 2002
+++ lib/libc/gen/readdir.c Tue Feb 26 18:50:49 2002
@@ -113,11 +113,11 @@
if (__isthreaded) {
_pthread_mutex_lock((pthread_mutex_t *)&dirp->dd_lock);
if ((dp = _readdir_unlocked(dirp)) != NULL)
- memcpy(entry, dp, sizeof *entry);
+ memcpy(entry, dp, _GENERIC_DIRSIZ(dp));
_pthread_mutex_unlock((pthread_mutex_t *)&dirp->dd_lock);
}
else if ((dp = _readdir_unlocked(dirp)) != NULL)
- memcpy(entry, dp, sizeof *entry);
+ memcpy(entry, dp, _GENERIC_DIRSIZ(dp));
if (errno != 0) {
if (dp == NULL)
> Tim find this bug. The old version doesn have this loop that is a infinite
> loop in OO.
Comment: I guess this is a bug in openoffice. Can someone help me to track it
down ?
--- lib/libc_r/uthread/uthread_join.c.orig Wed Dec 19 23:29:20 2001
+++ lib/libc_r/uthread/uthread_join.c Tue Feb 26 18:53:28 2002
@@ -124,10 +124,7 @@
/* Keep track of which thread we're joining to: */
curthread->join_status.thread = pthread;
- while (curthread->join_status.thread == pthread) {
- /* Schedule the next thread: */
- _thread_kern_sched_state(PS_JOIN, __FILE__, __LINE__);
- }
+ _thread_kern_sched_state(PS_JOIN, __FILE__, __LINE__);
/*
* The thread return value and error are set by the thread we're
> Tim again find this two patches to disable the cache.
What's wrong with the cache ?
--- ./libexec/rtld-elf/rtld.c.orig Wed Feb 6 09:37:41 2002
+++ ./libexec/rtld-elf/rtld.c Tue Feb 26 18:57:50 2002
@@ -844,10 +844,11 @@
*/
if (symnum >= refobj->nchains)
return NULL; /* Bad object */
- if (cache != NULL && cache[symnum].sym != NULL) {
- *defobj_out = cache[symnum].obj;
- return cache[symnum].sym;
- }
+/* if (cache != NULL && cache[symnum].sym != NULL) {
+ * *defobj_out = cache[symnum].obj;
+ * return cache[symnum].sym;
+ * }
+ */
ref = refobj->symtab + symnum;
name = refobj->strtab + ref->st_name;
@@ -868,10 +869,11 @@
if (def != NULL) {
*defobj_out = defobj;
/* Record the information in the cache to avoid subsequent lookups. */
- if (cache != NULL) {
- cache[symnum].sym = def;
- cache[symnum].obj = defobj;
- }
+ /* if (cache != NULL) {
+ * cache[symnum].sym = def;
+ * cache[symnum].obj = defobj;
+ * }
+ */
} else {
if (refobj != &obj_rtld)
_rtld_error("%s: Undefined symbol \"%s\"", refobj->path, name);
--- ./libexec/rtld-elf/i386/reloc.c.orig Thu Nov 1 21:37:39 2001
+++ ./libexec/rtld-elf/i386/reloc.c Tue Feb 26 18:55:10 2002
@@ -116,10 +116,10 @@
const Elf_Rel *rel;
SymCache *cache;
- cache = (SymCache *)alloca(obj->nchains * sizeof(SymCache));
- if (cache != NULL)
- memset(cache, 0, obj->nchains * sizeof(SymCache));
-
+/* cache = (SymCache *)alloca(obj->nchains * sizeof(SymCache));
+ * if (cache != NULL)
+ * memset(cache, 0, obj->nchains * sizeof(SymCache));
+ */
rellim = (const Elf_Rel *) ((caddr_t) obj->rel + obj->relsize);
for (rel = obj->rel; rel < rellim; rel++) {
Elf_Addr *where = (Elf_Addr *) (obj->relocbase + rel->r_offset);
Thank you for any pointers
Martin
Martin Blapp, <mb@imp.ch> <mbr@FreeBSD.org>
------------------------------------------------------------------
ImproWare AG, UNIXSP & ISP, Zurlindenstrasse 29, 4133 Pratteln, CH
Phone: +41 061 826 93 00: +41 61 826 93 01
PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E
------------------------------------------------------------------
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020226190200.A26547-100000>
