NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-alpha/54307: Lots of jemalloc assertions in latest -current
The following reply was made to PR port-alpha/54307; it has been noted by GNATS.
From: Rin Okuyama <rokuyama.rk%gmail.com@localhost>
To: "gnats-bugs%NetBSD.org@localhost" <gnats-bugs%NetBSD.org@localhost>
Cc: Christos Zoulas <christos%zoulas.com@localhost>
Subject: Re: port-alpha/54307: Lots of jemalloc assertions in latest -current
Date: Fri, 9 Aug 2019 16:59:02 +0900
jemalloc is still broken for alpha. For example,
----
# cd /usr/tests/bin; atf-run | atf-report
Tests root: /usr/tests/bin
atf-report: ERROR: 29: Unexpected token `<<EOF>>'; expected tps-count or
atf-report: info field
[1] Segmentation fault (core dumped) atf-run |
Done(1) atf-report
----
This is probably because alpha has 43-bit virtual address, whereas
jemalloc assumes 48.
The attached patch seems to fix the problem as far as I can see.
At least, pkgsrc/devel/GConf and net/libsoup in the PR, can build
for me.
Probably, other 64-bit ports are affected too, even though problems
are not visible like alpha...
Thanks,
rin
Index: external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h
===================================================================
RCS file: /home/netbsd/src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h,v
retrieving revision 1.10
diff -p -u -r1.10 jemalloc_internal_defs.h
--- external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h 14 May 2019 16:22:09 -0000 1.10
+++ external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h 7 Aug 2019 15:30:59 -0000
@@ -47,7 +47,11 @@
*/
#ifdef _LP64
/* XXX: I will take care of this later */
+# ifdef __alpha__
+#define LG_VADDR 43 /* bit 42 indicates direct map, 42--63 are same */
+# else
#define LG_VADDR 48
+# endif
#else
#define LG_VADDR 32
#endif
Index: external/bsd/jemalloc/lib/Makefile.inc
===================================================================
RCS file: /home/netbsd/src/external/bsd/jemalloc/lib/Makefile.inc,v
retrieving revision 1.10
diff -p -u -r1.10 Makefile.inc
--- external/bsd/jemalloc/lib/Makefile.inc 23 Jul 2019 06:31:20 -0000 1.10
+++ external/bsd/jemalloc/lib/Makefile.inc 6 Aug 2019 01:13:00 -0000
@@ -38,12 +38,14 @@ witness.c
.SUFFIXES: .3
.PATH.3: ${JEMALLOC}/dist/doc
.for i in ${JEMALLOC_SRCS}
-# helps in tracking bad malloc/pointer usage, but has a serious
-# performance penalty:
-# CPPFLAGS.${i}+=-I${JEMALLOC}/include -DJEMALLOC_PROTECT_NOSTD -DJEMALLOC_DEBUG
CPPFLAGS.${i}+=-I${JEMALLOC}/include -DJEMALLOC_PROTECT_NOSTD
COPTS.${i}+= -fvisibility=hidden -funroll-loops
COPTS.${i}+= ${${ACTIVE_CC} == "clang":? -Wno-atomic-alignment :}
+.if ${MACHINE} == "alpha"
+# helps in tracking bad malloc/pointer usage, but has a serious
+# performance penalty:
+CPPFLAGS.${i}+=-DJEMALLOC_DEBUG
+.endif
.endfor
COPTS.background_thread.c+=-Wno-error=stack-protector
Home |
Main Index |
Thread Index |
Old Index