[kaffe] CVS kaffe (guilhem): Stack handling updates + Imported sigcontext from glibc + Fixes + Chinese transl
Kaffe CVS
cvs-commits at kaffe.org
Mon Jun 7 12:54:03 PDT 2004
PatchSet 4830
Date: 2004/06/07 19:14:07
Author: guilhem
Branch: HEAD
Tag: (none)
Log:
Stack handling updates + Imported sigcontext from glibc + Fixes + Chinese translation.
2004-06-07 Guilhem Lavaux <guilhem at kaffe.org>
* configure.ac: Check for setrlimit. Fixed typo.
* FAQ/FAQ.kaffemd: Updated with new macros.
* config/Makefile.am: Updated EXTRA_DIST and noinst_HEADERS.
* config/Makefile.in, configure, config.h.in,
kaffe/kaffevm/Makefile.in: Regenerated.
* config/kaffe-unix-stack.h: New file to summarize stack size
detection on Unix/SysV architectures.
* config/alpha/linux/md.h, config/alpha/linux/sigcontextinfo.h,
config/arm/linux/md.h, config/arm/linux/sigcontextinfo.h,
config/i386/beos/md.h, config/i386/bsdi/md.h,
config/i386/dgux/md.h, config/i386/freebsd2/md.h,
config/i386/gnu/md.h, config/i386/linux/md.h,
config/i386/linux/sigcontextinfo.h, config/i386/netbsd1/md.h,
config/i386/nextstep3/md.h, config/i386/openbsd2/md.h,
config/i386/oskit/md.h, config/i386/qnx/md.h,
config/i386/sco3.2v5/md.h, config/i386/solaris2/md.h,
config/i386/univel_svr4/md.h, config/m68k/linux/md.h,
config/m68k/linux/sigcontextinfo.h, config/m68k/netbsd1/md.h,
config/m68k/openbsd2/md.h, config/mips/linux/md.h,
config/mips/linux/sigcontextinfo.h, config/powerpc/darwin/md.h,
config/powerpc/linux/md.h, config/powerpc/linux/sigcontextinfo.h,
config/s390/linux/md.h, config/s390/linux/sigcontextinfo.h,
config/sparc/bsdi3/md.h, config/sparc/linux/md.h,
config/sparc/openbsd2/md.h, config/sparc/solaris2/md.h,
config/sparc/sunos4/md.h, config/sparc/uxpds/md.h
config/x86_64/linux/md.h, config/x86_64/linux/sigcontextinfo.h:
Moved mdGetStackSize to kaffe-unix-stack.h
On linux platforms, use sigcontextinfo.h from GLIBC 2.3.2.
* kaffe/kaffevm/Makefile.am: New file verify-errors.h
* kaffe/kaffevm/thread.c: Upgraded stack handling to use mdSetStackSize.
* kaffe/kaffevm/verify-errors.h, kaffe/kaffevm/verify.c:
Moved some function to verify-errors.h to ease up the reading.
3000+ lines is just too much.
* libraries/javalib/rebuildLib.in: Set the stacksize to 500k for kjc.
2004-06-07 Jim Huang <jserv at linux2.cc.ntu.edu.tw>
* po/LINGUAS, po/zh_TW.po: Traditional Chinese support for kaffe.
Members:
ChangeLog:1.2398->1.2399
configure:1.328->1.329
configure.ac:1.27->1.28
FAQ/FAQ.kaffemd:1.1->1.2
config/Makefile.am:1.40->1.41
config/Makefile.in:1.130->1.131
config/config.h.in:1.103->1.104
config/kaffe-unix-stack.h:INITIAL->1.1
config/alpha/linux/md.h:1.4->1.5
config/alpha/linux/sigcontextinfo.h:INITIAL->1.1
config/arm/linux/md.h:1.9->1.10
config/arm/linux/sigcontextinfo.h:INITIAL->1.1
config/i386/beos/md.h:1.10->1.11
config/i386/bsdi/md.h:1.8->1.9
config/i386/dgux/md.h:1.7->1.8
config/i386/freebsd2/md.h:1.13->1.14
config/i386/gnu/md.h:1.8->1.9
config/i386/linux/md.c:1.2->1.3
config/i386/linux/md.h:1.13->1.14
config/i386/linux/sigcontextinfo.h:INITIAL->1.1
config/i386/netbsd1/md.h:1.7->1.8
config/i386/nextstep3/md.h:1.8->1.9
config/i386/openbsd2/md.h:1.9->1.10
config/i386/oskit/md.h:1.9->1.10
config/i386/qnx/md.h:1.10->1.11
config/i386/sco3.2v5/md.h:1.8->1.9
config/i386/solaris2/md.h:1.8->1.9
config/i386/univel_svr4/md.h:1.10->1.11
config/m68k/linux/md.h:1.10->1.11
config/m68k/linux/sigcontextinfo.h:INITIAL->1.1
config/m68k/netbsd1/md.h:1.6->1.7
config/m68k/openbsd2/md.h:1.5->1.6
config/mips/linux/md.h:1.6->1.7
config/mips/linux/sigcontextinfo.h:INITIAL->1.1
config/powerpc/darwin/md.h:1.5->1.6
config/powerpc/linux/md.h:1.7->1.8
config/powerpc/linux/sigcontextinfo.h:INITIAL->1.1
config/s390/linux/md.h:1.3->1.4
config/s390/linux/sigcontextinfo.h:INITIAL->1.1
config/sparc/bsdi3/md.h:1.6->1.7
config/sparc/linux/md.h:1.9->1.10
config/sparc/openbsd2/md.h:1.9->1.10
config/sparc/solaris2/md.h:1.6->1.7
config/sparc/sunos4/md.h:1.9->1.10
config/sparc/uxpds/md.h:1.6->1.7
config/x86_64/linux/md.h:1.1->1.2
config/x86_64/linux/sigcontextinfo.h:INITIAL->1.1
kaffe/kaffevm/Makefile.am:1.58->1.59
kaffe/kaffevm/Makefile.in:1.152->1.153
kaffe/kaffevm/thread.c:1.65->1.66
kaffe/kaffevm/verify-errors.h:INITIAL->1.1
kaffe/kaffevm/verify.c:1.76->1.77
libraries/javalib/rebuildLib.in:1.40->1.41
po/LINGUAS:1.2->1.3
po/zh_TW.po:INITIAL->1.1
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2398 kaffe/ChangeLog:1.2399
--- kaffe/ChangeLog:1.2398 Sun Jun 6 15:22:45 2004
+++ kaffe/ChangeLog Mon Jun 7 19:14:07 2004
@@ -1,3 +1,53 @@
+2004-06-07 Guilhem Lavaux <guilhem at kaffe.org>
+
+ * configure.ac: Check for setrlimit. Fixed typo.
+
+ * FAQ/FAQ.kaffemd: Updated with new macros.
+
+ * config/Makefile.am: Updated EXTRA_DIST and noinst_HEADERS.
+
+ * config/Makefile.in, configure, config.h.in,
+ kaffe/kaffevm/Makefile.in: Regenerated.
+
+ * config/kaffe-unix-stack.h: New file to summarize stack size
+ detection on Unix/SysV architectures.
+
+ * config/alpha/linux/md.h, config/alpha/linux/sigcontextinfo.h,
+ config/arm/linux/md.h, config/arm/linux/sigcontextinfo.h,
+ config/i386/beos/md.h, config/i386/bsdi/md.h,
+ config/i386/dgux/md.h, config/i386/freebsd2/md.h,
+ config/i386/gnu/md.h, config/i386/linux/md.h,
+ config/i386/linux/sigcontextinfo.h, config/i386/netbsd1/md.h,
+ config/i386/nextstep3/md.h, config/i386/openbsd2/md.h,
+ config/i386/oskit/md.h, config/i386/qnx/md.h,
+ config/i386/sco3.2v5/md.h, config/i386/solaris2/md.h,
+ config/i386/univel_svr4/md.h, config/m68k/linux/md.h,
+ config/m68k/linux/sigcontextinfo.h, config/m68k/netbsd1/md.h,
+ config/m68k/openbsd2/md.h, config/mips/linux/md.h,
+ config/mips/linux/sigcontextinfo.h, config/powerpc/darwin/md.h,
+ config/powerpc/linux/md.h, config/powerpc/linux/sigcontextinfo.h,
+ config/s390/linux/md.h, config/s390/linux/sigcontextinfo.h,
+ config/sparc/bsdi3/md.h, config/sparc/linux/md.h,
+ config/sparc/openbsd2/md.h, config/sparc/solaris2/md.h,
+ config/sparc/sunos4/md.h, config/sparc/uxpds/md.h
+ config/x86_64/linux/md.h, config/x86_64/linux/sigcontextinfo.h:
+ Moved mdGetStackSize to kaffe-unix-stack.h
+ On linux platforms, use sigcontextinfo.h from GLIBC 2.3.2.
+
+ * kaffe/kaffevm/Makefile.am: New file verify-errors.h
+
+ * kaffe/kaffevm/thread.c: Upgraded stack handling to use mdSetStackSize.
+
+ * kaffe/kaffevm/verify-errors.h, kaffe/kaffevm/verify.c:
+ Moved some function to verify-errors.h to ease up the reading.
+ 3000+ lines is just too much.
+
+ * libraries/javalib/rebuildLib.in: Set the stacksize to 500k for kjc.
+
+2004-06-07 Jim Huang <jserv at linux2.cc.ntu.edu.tw>
+
+ * po/LINGUAS, po/zh_TW.po: Traditional Chinese support for kaffe.
+
2004-06-06 Dalibor Topic <robilad at kaffe.org>
* config/powerpc/linux/md.h:
Index: kaffe/configure
diff -u kaffe/configure:1.328 kaffe/configure:1.329
--- kaffe/configure:1.328 Sun Jun 6 12:48:38 2004
+++ kaffe/configure Mon Jun 7 19:14:08 2004
@@ -2122,7 +2122,6 @@
esac
-wdnl -------------------------------------------------------------------------
# Check whether --with-includes or --without-includes was given.
@@ -8924,7 +8923,7 @@
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 8927 "configure"' > conftest.$ac_ext
+ echo '#line 8926 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -10274,7 +10273,7 @@
# Provide some information about the compiler.
-echo "$as_me:10277:" \
+echo "$as_me:10276:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -11312,11 +11311,11 @@
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11315: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11314: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11319: \$? = $ac_status" >&5
+ echo "$as_me:11318: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -11545,11 +11544,11 @@
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11548: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11547: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11552: \$? = $ac_status" >&5
+ echo "$as_me:11551: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -11605,11 +11604,11 @@
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11608: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11607: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:11612: \$? = $ac_status" >&5
+ echo "$as_me:11611: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -13789,7 +13788,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 13792 "configure"
+#line 13791 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13887,7 +13886,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 13890 "configure"
+#line 13889 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -16070,11 +16069,11 @@
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16073: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16072: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16077: \$? = $ac_status" >&5
+ echo "$as_me:16076: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -16130,11 +16129,11 @@
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16133: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16132: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16137: \$? = $ac_status" >&5
+ echo "$as_me:16136: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -17491,7 +17490,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 17494 "configure"
+#line 17493 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -17589,7 +17588,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 17592 "configure"
+#line 17591 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -18416,11 +18415,11 @@
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18419: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:18418: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:18423: \$? = $ac_status" >&5
+ echo "$as_me:18422: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -18476,11 +18475,11 @@
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18479: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:18478: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:18483: \$? = $ac_status" >&5
+ echo "$as_me:18482: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -20514,11 +20513,11 @@
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:20517: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:20516: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:20521: \$? = $ac_status" >&5
+ echo "$as_me:20520: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -20747,11 +20746,11 @@
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:20750: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:20749: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:20754: \$? = $ac_status" >&5
+ echo "$as_me:20753: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -20807,11 +20806,11 @@
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:20810: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:20809: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:20814: \$? = $ac_status" >&5
+ echo "$as_me:20813: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -22991,7 +22990,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 22994 "configure"
+#line 22993 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -23089,7 +23088,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 23092 "configure"
+#line 23091 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -50724,7 +50723,8 @@
-for ac_func in sbrk valloc memalign mallopt getrlimit sigaltstack
+
+for ac_func in sbrk valloc memalign mallopt getrlimit setrlimit sigaltstack
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
Index: kaffe/configure.ac
diff -u kaffe/configure.ac:1.27 kaffe/configure.ac:1.28
--- kaffe/configure.ac:1.27 Sun Jun 6 12:48:45 2004
+++ kaffe/configure.ac Mon Jun 7 19:14:11 2004
@@ -56,7 +56,7 @@
dnl =========================================================================
dnl Allow specification of header-file and library directories
-wdnl -------------------------------------------------------------------------
+dnl -------------------------------------------------------------------------
AC_ARG_WITH([includes],
AS_HELP_STRING([--with-includes=dirs],
@@ -1393,7 +1393,7 @@
AC_CHECK_FUNCS([fcntl ioctl])
AC_CHECK_FUNCS([alarm setitimer])
AC_CHECK_FUNCS([sigprocmask sigsetmask sigemptyset sigaddset signal sigaction])
-AC_CHECK_FUNCS([sbrk valloc memalign mallopt getrlimit sigaltstack])
+AC_CHECK_FUNCS([sbrk valloc memalign mallopt getrlimit setrlimit sigaltstack])
AC_CHECK_FUNCS([madvise])
AC_CHECK_FUNCS([waitpid kill fork execve execvp])
AC_CHECK_FUNCS([sync fsync ftruncate])
Index: kaffe/FAQ/FAQ.kaffemd
diff -u kaffe/FAQ/FAQ.kaffemd:1.1 kaffe/FAQ/FAQ.kaffemd:1.2
--- kaffe/FAQ/FAQ.kaffemd:1.1 Sun May 9 14:20:11 2004
+++ kaffe/FAQ/FAQ.kaffemd Mon Jun 7 19:14:14 2004
@@ -30,3 +30,21 @@
This macro is to be defined is the platform supports mdGetStackEnd(). This
function returns a pointer to the end of the stack.
+
+KAFFEMD_STACKSIZE
+-----------------
+
+This macro specifies whether the platform supports mdGetStackSize(),
+mdSetStackSize(), KAFFEMD_STACK_INFINITY and KAFFEMD_STACK_ERROR.
+mdGetStackSize() returns the maximum acceptable stack size for the OS.
+mdSetStackSize() changes this limit.
+KAFFEMD_STACK_INFINITY is an alias for the value representing an infinite
+stack size.
+KAFFEMD_STACK_ERROR is an alias for the special value representing an error for
+mdGetStackSize() (usually 0).
+
+KAFFEMD_BUGGY_STACKOVERFLOW
+---------------------------
+
+This macro indicated that the architecture has a buggy stack overflow handling
+and thus kaffe must take care of not enabling some stack protection features.
Index: kaffe/config/Makefile.am
diff -u kaffe/config/Makefile.am:1.40 kaffe/config/Makefile.am:1.41
--- kaffe/config/Makefile.am:1.40 Sun Jun 6 15:04:49 2004
+++ kaffe/config/Makefile.am Mon Jun 7 19:14:14 2004
@@ -45,7 +45,8 @@
config-net.h \
config-setjmp.h \
config-signal.h \
- config-std.h
+ config-std.h \
+ kaffe-unix-stack.h
EXTRA_DIST = \
config.alias \
@@ -62,6 +63,7 @@
alpha/linux/jit-md.h \
alpha/linux/md.c \
alpha/linux/md.h \
+ alpha/linux/sigcontextinfo.h \
alpha/netbsd1/config.frag \
alpha/netbsd1/jit-md.h \
alpha/netbsd1/md.c \
@@ -85,6 +87,7 @@
arm/linux/jit-md.h \
arm/linux/md.c \
arm/linux/md.h \
+ arm/linux/sigcontextinfo.h \
arm/netbsd1/config.frag \
arm/netbsd1/jit-md.h \
arm/netbsd1/jit3-md.h \
@@ -107,6 +110,7 @@
x86_64/linux/config.frag \
x86_64/linux/md.c \
x86_64/linux/md.h \
+ x86_64/linux/sigcontextinfo.h \
x86_64/threads.h \
x86_64/sysdepCallMethod.h \
i386/beos/config.frag \
@@ -149,6 +153,7 @@
i386/linux/jit3-md.h \
i386/linux/md.c \
i386/linux/md.h \
+ i386/linux/sigcontextinfo.h \
i386/linux/xprofile-md.h \
i386/netbsd1/config.frag \
i386/netbsd1/jit-md.h \
@@ -218,6 +223,7 @@
m68k/linux/jit-md.h \
m68k/linux/md.c \
m68k/linux/md.h \
+ m68k/linux/sigcontextinfo.h \
m68k/netbsd1/config.frag \
m68k/netbsd1/jit-md.h \
m68k/netbsd1/jit3-md.h \
@@ -250,6 +256,7 @@
mips/linux/jit3-md.h \
mips/linux/md.c \
mips/linux/md.h \
+ mips/linux/sigcontextinfo.h \
mips/mips.c \
mips/n32-sysdepCallMethod.h \
mips/netbsd1/config.frag \
Index: kaffe/config/Makefile.in
diff -u kaffe/config/Makefile.in:1.130 kaffe/config/Makefile.in:1.131
--- kaffe/config/Makefile.in:1.130 Sun Jun 6 15:04:49 2004
+++ kaffe/config/Makefile.in Mon Jun 7 19:14:14 2004
@@ -347,7 +347,8 @@
config-net.h \
config-setjmp.h \
config-signal.h \
- config-std.h
+ config-std.h \
+ kaffe-unix-stack.h
EXTRA_DIST = \
config.alias \
@@ -364,6 +365,7 @@
alpha/linux/jit-md.h \
alpha/linux/md.c \
alpha/linux/md.h \
+ alpha/linux/sigcontextinfo.h \
alpha/netbsd1/config.frag \
alpha/netbsd1/jit-md.h \
alpha/netbsd1/md.c \
@@ -387,6 +389,7 @@
arm/linux/jit-md.h \
arm/linux/md.c \
arm/linux/md.h \
+ arm/linux/sigcontextinfo.h \
arm/netbsd1/config.frag \
arm/netbsd1/jit-md.h \
arm/netbsd1/jit3-md.h \
@@ -409,6 +412,7 @@
x86_64/linux/config.frag \
x86_64/linux/md.c \
x86_64/linux/md.h \
+ x86_64/linux/sigcontextinfo.h \
x86_64/threads.h \
x86_64/sysdepCallMethod.h \
i386/beos/config.frag \
@@ -451,6 +455,7 @@
i386/linux/jit3-md.h \
i386/linux/md.c \
i386/linux/md.h \
+ i386/linux/sigcontextinfo.h \
i386/linux/xprofile-md.h \
i386/netbsd1/config.frag \
i386/netbsd1/jit-md.h \
@@ -520,6 +525,7 @@
m68k/linux/jit-md.h \
m68k/linux/md.c \
m68k/linux/md.h \
+ m68k/linux/sigcontextinfo.h \
m68k/netbsd1/config.frag \
m68k/netbsd1/jit-md.h \
m68k/netbsd1/jit3-md.h \
@@ -552,6 +558,7 @@
mips/linux/jit3-md.h \
mips/linux/md.c \
mips/linux/md.h \
+ mips/linux/sigcontextinfo.h \
mips/mips.c \
mips/n32-sysdepCallMethod.h \
mips/netbsd1/config.frag \
Index: kaffe/config/config.h.in
diff -u kaffe/config/config.h.in:1.103 kaffe/config/config.h.in:1.104
--- kaffe/config/config.h.in:1.103 Fri Jun 4 19:32:37 2004
+++ kaffe/config/config.h.in Mon Jun 7 19:14:14 2004
@@ -399,6 +399,9 @@
/* Define to 1 if you have the `setitimer' function. */
#undef HAVE_SETITIMER
+/* Define to 1 if you have the `setrlimit' function. */
+#undef HAVE_SETRLIMIT
+
/* Define to 1 if you have the `sigaction' function. */
#undef HAVE_SIGACTION
===================================================================
Checking out kaffe/config/kaffe-unix-stack.h
RCS: /home/cvs/kaffe/kaffe/config/kaffe-unix-stack.h,v
VERS: 1.1
***************
--- /dev/null Sun Aug 4 19:57:58 2002
+++ kaffe/config/kaffe-unix-stack.h Mon Jun 7 19:19:55 2004
@@ -0,0 +1,55 @@
+/*
+ * config/kaffe-unix-stack.h
+ * Commmon code for handling stack size on SYSV/BSD compliant OS.
+ *
+ * Copyright (c) 2004
+ * Kaffe.org contributors. See ChangeLog for details.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file.
+ */
+#ifndef _kaffe_unix_stack_h
+#define _kaffe_unix_stack_h
+
+#include "config.h"
+
+#if defined(HAVE_SETRLIMIT) && defined(HAVE_GETRLIMIT)
+
+#if defined(HAVE_SYS_TIME_H)
+#include <sys/time.h>
+#endif
+#if defined(HAVE_SYS_RESOURCE_H)
+#include <sys/resource.h>
+#endif
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+
+#define KAFFEMD_STACK_INFINITE RLIM_INFINITY
+#define KAFFEMD_STACK_ERROR 0
+
+#define KAFFEMD_STACKSIZE
+
+static inline rlim_t mdGetStackSize(void)
+{
+ struct rlimit rl;
+
+ if (getrlimit(RLIMIT_STACK, &rl) < 0)
+ return KAFFEMD_STACK_ERROR;
+ else
+ return rl.rlim_cur;
+}
+
+
+static inline void mdSetStackSize(rlim_t limit)
+{
+ struct rlimit rl;
+
+ getrlimit(RLIMIT_STACK, &rl);
+ rl.rlim_cur = limit;
+ setrlimit(RLIMIT_STACK, &rl);
+}
+
+#endif
+
+#endif
Index: kaffe/config/alpha/linux/md.h
diff -u kaffe/config/alpha/linux/md.h:1.4 kaffe/config/alpha/linux/md.h:1.5
--- kaffe/config/alpha/linux/md.h:1.4 Fri Aug 1 17:21:23 2003
+++ kaffe/config/alpha/linux/md.h Mon Jun 7 19:14:15 2004
@@ -22,10 +22,13 @@
#undef SP_OFFSET
#define SP_OFFSET 8
+#include "sigcontextinfo.h"
+
#define SIGNAL_ARGS(sig, sc) int sig, int alpha_dummy, struct sigcontext *sc
#define SIGNAL_CONTEXT_POINTER(scp) struct sigcontext * scp
#define GET_SIGNAL_CONTEXT_POINTER(sc) (&sc)
-#define SIGNAL_PC(scp) scp->pc
+#define SIGNAL_PC(scp) (GET_PC((*scp)))
+#define STACK_POINTER(scp) (GET_STACK((*scp)))
/* Linux requires a little initialisation */
extern void init_md(void);
===================================================================
Checking out kaffe/config/alpha/linux/sigcontextinfo.h
RCS: /home/cvs/kaffe/kaffe/config/alpha/linux/sigcontextinfo.h,v
VERS: 1.1
***************
--- /dev/null Sun Aug 4 19:57:58 2002
+++ kaffe/config/alpha/linux/sigcontextinfo.h Mon Jun 7 19:19:56 2004
@@ -0,0 +1,25 @@
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define SIGCONTEXT struct sigcontext
+#define SIGCONTEXT_EXTRA_ARGS
+#define GET_PC(ctx) ((void *) (ctx).sc_pc)
+#define GET_FRAME(ctx) ((void *) (ctx).sc_regs[15])
+#define GET_STACK(ctx) ((void *) (ctx).sc_regs[30])
+#define CALL_SIGHANDLER(handler, signo, ctx) \
+ (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
Index: kaffe/config/arm/linux/md.h
diff -u kaffe/config/arm/linux/md.h:1.9 kaffe/config/arm/linux/md.h:1.10
--- kaffe/config/arm/linux/md.h:1.9 Tue Mar 9 18:18:27 2004
+++ kaffe/config/arm/linux/md.h Mon Jun 7 19:14:15 2004
@@ -45,13 +45,12 @@
#error Do not know how to define SIGNAL_ARGS
#endif
+#include "sigcontextinfo.h"
+
#define GET_SIGNAL_CONTEXT_POINTER(ctx) (&ctx)
-#if defined(HAVE_REG_SIGCONTEXT)
-#define SIGNAL_PC(ctx) (ctx)->reg.ARM_pc
-#else
-#define SIGNAL_PC(ctx) (ctx)->arm_pc
-#endif
+#define SIGNAL_PC(ctx) (GET_PC((*ctx)))
+#define STACK_POINTER(ctx) (GET_STACK((*ctx)))
#if defined(TRANSLATOR)
#include "jit-md.h"
===================================================================
Checking out kaffe/config/arm/linux/sigcontextinfo.h
RCS: /home/cvs/kaffe/kaffe/config/arm/linux/sigcontextinfo.h,v
VERS: 1.1
***************
--- /dev/null Sun Aug 4 19:57:58 2002
+++ kaffe/config/arm/linux/sigcontextinfo.h Mon Jun 7 19:19:56 2004
@@ -0,0 +1,51 @@
+/* Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Philip Blundell <philb at gnu.org>, 1999.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <bits/armsigctx.h>
+#include "kernel-features.h"
+
+#define SIGCONTEXT int _a2, int _a3, int _a4, union k_sigcontext
+#define SIGCONTEXT_EXTRA_ARGS _a2, _a3, _a4,
+
+/* The sigcontext structure changed between 2.0 and 2.1 kernels. On any
+ modern system we should be able to assume that the "new" format will be
+ in use. */
+#if __LINUX_KERNEL_VERSION > 131328
+
+#define GET_PC(ctx) ((void *) ctx.v21.arm_pc)
+#define GET_FRAME(ctx) ADVANCE_STACK_FRAME ((void *) ctx.v21.arm_fp)
+#define GET_STACK(ctx) ((void *) ctx.v21.arm_sp)
+
+#else
+
+#define GET_PC(ctx) ((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \
+ ctx.v20.reg.ARM_pc : ctx.v21.arm_pc))
+#define GET_FRAME(ctx) \
+ ADVANCE_STACK_FRAME((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \
+ ctx.v20.reg.ARM_fp : ctx.v21.arm_fp))
+#define GET_STACK(ctx) ((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \
+ ctx.v20.reg.ARM_sp : ctx.v21.arm_sp))
+
+#endif
+
+#define ADVANCE_STACK_FRAME(frm) \
+ ((struct layout *)frm - 1)
+
+#define CALL_SIGHANDLER(handler, signo, ctx) \
+ (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
Index: kaffe/config/i386/beos/md.h
diff -u kaffe/config/i386/beos/md.h:1.10 kaffe/config/i386/beos/md.h:1.11
--- kaffe/config/i386/beos/md.h:1.10 Wed Apr 28 12:01:45 2004
+++ kaffe/config/i386/beos/md.h Mon Jun 7 19:14:15 2004
@@ -47,18 +47,7 @@
#include "jit-md.h"
#endif
-#if defined(HAVE_GETRLIMIT)
-#define KAFFEMD_STACKSIZE
-
-static inline rlim_t mdGetStackSize(void)
-{
- struct rlimit rl;
-
- if (getrlimit(RLIMIT_STACK, &rl) < 0)
- return 0;
- else
- return (rl.rlim_max >= RLIM_INFINITY) ? rl.rlim_cur : rl.rlim_max;
-}
-#endif
+/* Until someone reports an error. We fall back on BSD compatibility. */
+#include "kaffe-unix-stack.h"
#endif
Index: kaffe/config/i386/bsdi/md.h
diff -u kaffe/config/i386/bsdi/md.h:1.8 kaffe/config/i386/bsdi/md.h:1.9
--- kaffe/config/i386/bsdi/md.h:1.8 Wed Apr 28 12:01:45 2004
+++ kaffe/config/i386/bsdi/md.h Mon Jun 7 19:14:16 2004
@@ -66,20 +66,7 @@
#undef JTHREAD_JMPBUF
#define JTHREAD_JMPBUF i386_jmp_buf
-
-#if defined(HAVE_GETRLIMIT)
-#define KAFFEMD_STACKSIZE
-
-static inline rlim_t mdGetStackSize(void)
-{
- struct rlimit rl;
-
- if (getrlimit(RLIMIT_STACK, &rl) < 0)
- return 0;
- else
- return (rl.rlim_max >= RLIM_INFINITY) ? rl.rlim_cur : rl.rlim_max;
-}
-#endif
+#include "kaffe-unix-stack.h"
#endif
Index: kaffe/config/i386/dgux/md.h
diff -u kaffe/config/i386/dgux/md.h:1.7 kaffe/config/i386/dgux/md.h:1.8
--- kaffe/config/i386/dgux/md.h:1.7 Wed Apr 28 12:01:46 2004
+++ kaffe/config/i386/dgux/md.h Mon Jun 7 19:14:16 2004
@@ -43,18 +43,6 @@
#include "jit-md.h"
#endif
-#if defined(HAVE_GETRLIMIT)
-#define KAFFEMD_STACKSIZE
-
-static inline rlim_t mdGetStackSize(void)
-{
- struct rlimit rl;
-
- if (getrlimit(RLIMIT_STACK, &rl) < 0)
- return 0;
- else
- return (rl.rlim_max >= RLIM_INFINITY) ? rl.rlim_cur : rl.rlim_max;
-}
-#endif
+#include "kaffe-unix-stack.h"
#endif
Index: kaffe/config/i386/freebsd2/md.h
diff -u kaffe/config/i386/freebsd2/md.h:1.13 kaffe/config/i386/freebsd2/md.h:1.14
--- kaffe/config/i386/freebsd2/md.h:1.13 Sun May 9 14:57:32 2004
+++ kaffe/config/i386/freebsd2/md.h Mon Jun 7 19:14:17 2004
@@ -66,19 +66,7 @@
#include "jit-md.h"
#endif
-#if defined(HAVE_GETRLIMIT)
-#define KAFFEMD_STACKSIZE
-
-static inline rlim_t mdGetStackSize(void)
-{
- struct rlimit rl;
-
- if (getrlimit(RLIMIT_STACK, &rl) < 0)
- return 0;
- else
- return (rl.rlim_max >= RLIM_INFINITY) ? rl.rlim_cur : rl.rlim_max;
-}
-#endif
+#include "kaffe-unix-stack.h"
#if defined(HAVE_SYS_SYSCTL_H)
#define KAFFEMD_STACKBASE
Index: kaffe/config/i386/gnu/md.h
diff -u kaffe/config/i386/gnu/md.h:1.8 kaffe/config/i386/gnu/md.h:1.9
--- kaffe/config/i386/gnu/md.h:1.8 Wed Apr 28 12:01:46 2004
+++ kaffe/config/i386/gnu/md.h Mon Jun 7 19:14:17 2004
@@ -68,18 +68,6 @@
extern void init_md(void);
#define INIT_MD() init_md()
-#if defined(HAVE_GETRLIMIT)
-#define KAFFEMD_STACKSIZE
-
-static inline rlim_t mdGetStackSize(void)
-{
- struct rlimit rl;
-
- if (getrlimit(RLIMIT_STACK, &rl) < 0)
- return 0;
- else
- return (rl.rlim_max >= RLIM_INFINITY) ? rl.rlim_cur : rl.rlim_max;
-}
-#endif
+#include "kaffe-unix-stack.h"
#endif
Index: kaffe/config/i386/linux/md.c
diff -u kaffe/config/i386/linux/md.c:1.2 kaffe/config/i386/linux/md.c:1.3
--- kaffe/config/i386/linux/md.c:1.2 Sun May 9 14:20:12 2004
+++ kaffe/config/i386/linux/md.c Mon Jun 7 19:14:17 2004
@@ -10,7 +10,10 @@
*/
#include "config.h"
+#include "gtypes.h"
#include <malloc.h>
+#include <unistd.h>
+#include <stdio.h>
#if defined(HAVE_FEATURES_H)
#include <features.h>
#endif
@@ -28,6 +31,8 @@
void *mdGetStackBase(void)
{
- return __libc_stack_end;
+ long sz = sysconf(_SC_PAGESIZE);
+
+ return (void *)(((uintp)__libc_stack_end + sz - 1) & (-sz));
}
#endif
Index: kaffe/config/i386/linux/md.h
diff -u kaffe/config/i386/linux/md.h:1.13 kaffe/config/i386/linux/md.h:1.14
--- kaffe/config/i386/linux/md.h:1.13 Fri Jun 4 20:28:15 2004
+++ kaffe/config/i386/linux/md.h Mon Jun 7 19:14:18 2004
@@ -72,25 +72,13 @@
#error Do not know how to define SIGNAL_ARGS
#endif
-#define GET_SIGNAL_CONTEXT_POINTER(sc) (&sc)
-#define SIGNAL_PC(scp) (scp)->eip
-#define STACK_POINTER(scp) (scp)->esp
-
-#if defined(HAVE_GETRLIMIT)
-#define KAFFEMD_STACKSIZE
+#include "sigcontextinfo.h"
-static inline rlim_t mdGetStackSize(void)
-{
- struct rlimit rl;
+#define GET_SIGNAL_CONTEXT_POINTER(sc) (&sc)
+#define SIGNAL_PC(scp) (GET_PC((*scp)))
+#define STACK_POINTER(scp) (GET_STACK((*scp)))
- // The soft limit is always the lower limit.
- // Use it by default.
- if (getrlimit(RLIMIT_STACK, &rl) < 0)
- return 0;
- else
- return rl.rlim_cur;
-}
-#endif
+#include "kaffe-unix-stack.h"
#if defined(__GLIBC__)
#define KAFFEMD_STACKBASE
===================================================================
Checking out kaffe/config/i386/linux/sigcontextinfo.h
RCS: /home/cvs/kaffe/kaffe/config/i386/linux/sigcontextinfo.h,v
VERS: 1.1
***************
--- /dev/null Sun Aug 4 19:57:58 2002
+++ kaffe/config/i386/linux/sigcontextinfo.h Mon Jun 7 19:19:58 2004
@@ -0,0 +1,51 @@
+/* Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper at cygnus.com>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
*** Patch too long, truncated ***
More information about the kaffe
mailing list