summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2008-05-07 13:10:32 -0400
committerFrank Ch. Eigler <fche@elastic.org>2008-05-07 13:10:32 -0400
commit9204dcfbe16061f799068eeacff5dc68ad33e523 (patch)
treed0b0d6b9a850527b6ddf756de8846023933a4f18
parent49628242c239feb617b838bb5d90488386645bd6 (diff)
parent12603f28dc1abdfdff43c53b939ebb528382512e (diff)
downloadsystemtap-steved-9204dcfbe16061f799068eeacff5dc68ad33e523.tar.gz
systemtap-steved-9204dcfbe16061f799068eeacff5dc68ad33e523.tar.xz
systemtap-steved-9204dcfbe16061f799068eeacff5dc68ad33e523.zip
Merge branch 'master' into pr6429-comp-unwindsyms
* master: PR444886: add .../build/... to default debuginfo search path More signal cleanup. Fix problem handling SIG_CHLD Cleanup signal handling for staprun. PR6481: timer reset needs irqs reenabled Made runtime/task_finder.c improvements. PR6474: use position-independent-executable security c/ld-flags for stap* binaries 2008-05-01 William Cohen <wcohen@redhat.com> add git commit summary guidelines PR5648: Fix unaligned access warning on ia64. PR6008: Increase the limitation of the buffer size to 4095MB. PR5645: Fix sub-buffer size calculation and debug messages.
-rw-r--r--ChangeLog20
-rw-r--r--HACKING3
-rw-r--r--Makefile.am6
-rw-r--r--Makefile.in33
-rw-r--r--aclocal.m438
-rwxr-xr-xconfigure85
-rw-r--r--configure.ac23
-rw-r--r--doc/Makefile.in5
-rw-r--r--main.cxx4
-rw-r--r--runtime/ChangeLog23
-rw-r--r--runtime/staprun/ChangeLog25
-rw-r--r--runtime/staprun/common.c6
-rw-r--r--runtime/staprun/mainloop.c122
-rw-r--r--runtime/staprun/stapio.c2
-rw-r--r--runtime/staprun/staprun.c2
-rw-r--r--runtime/task_finder.c139
-rw-r--r--runtime/time.c7
-rw-r--r--runtime/transport/ChangeLog6
-rw-r--r--runtime/transport/transport.c6
-rw-r--r--runtime/vsprintf.c6
-rw-r--r--staprun.8.in2
-rw-r--r--tapsets.cxx2
-rw-r--r--testsuite/systemtap.examples/ChangeLog4
-rw-r--r--testsuite/systemtap.examples/helloworld.meta13
-rw-r--r--translate.cxx2
25 files changed, 403 insertions, 181 deletions
diff --git a/ChangeLog b/ChangeLog
index a18df886..57b1debc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2008-05-05 Frank Ch. Eigler <fche@elastic.org>
+
+ PR 444886. From <crquan@gmail.com>:
+ * tapsets.cxx, translate.cxx: Add .../build/... to default debuginfo
+ path, to ease search for hand-built kernels.
+
+2008-05-01 Frank Ch. Eigler <fche@elastic.org>
+
+ PR 6474
+ * configure.ac (--enable-pie): Add default option.
+ * Makefile.am (stap* binaries): Use -fpie/-z relro/-z now as
+ applicable.
+ * configure, aclocal.m4, Makefile.in, doc/Makefile.in: Regenerated.
+
+2008-04-30 Masami Hiramatsu <mhiramat@redhat.com>
+
+ PR 6008
+ * main.cxx (main): Increase the limitation of buffer size to 4095MB.
+ * staprun.8.in: Ditto.
+
2008-04-29 Frank Ch. Eigler <fche@elastic.org>
PR 6466
diff --git a/HACKING b/HACKING
index 267f008a..de8b94b4 100644
--- a/HACKING
+++ b/HACKING
@@ -36,6 +36,9 @@ the <systemtap@sources.redhat.com> mailing list.
Some subdirectories have ChangeLog files of their own, so make sure
you find the correct ones to prepend.
+ In the git commit message, make the first line an brief summary of
+ the patch. There is no need to transcribe the ChangeLog entries there.
+
- test suites
As far as practicable, changes should be accompanied by test cases
diff --git a/Makefile.am b/Makefile.am
index dd53d87f..4eb1335b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -63,10 +63,10 @@ git_version.h:
stap_CXXFLAGS = $(AM_CXXFLAGS)
stap_CPPFLAGS = $(AM_CPPFLAGS)
-stap_LDFLAGS = $(AM_LDFLAGS)
-
+stap_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@
+staprun_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@
stapio_CPPFLAGS = $(AM_CPPFLAGS)
-stapio_LDFLAGS = $(AM_LDFLAGS)
+stapio_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@
if BUILD_ELFUTILS
# This tells automake's "make distcheck" what we need to compile.
diff --git a/Makefile.in b/Makefile.in
index 66dc43ec..8ff882b4 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -118,7 +118,7 @@ am_staprun_OBJECTS = staprun-staprun.$(OBJEXT) \
staprun-common.$(OBJEXT) staprun-cap.$(OBJEXT)
staprun_OBJECTS = $(am_staprun_OBJECTS)
staprun_DEPENDENCIES =
-staprun_LINK = $(CCLD) $(staprun_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+staprun_LINK = $(CCLD) $(staprun_CFLAGS) $(CFLAGS) $(staprun_LDFLAGS) \
$(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp
@@ -209,6 +209,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PIELDFLAGS = @PIELDFLAGS@
PROCFLAGS = @PROCFLAGS@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
@@ -294,9 +295,10 @@ CLEANFILES = git_version.h $(am__append_6) $(pkglibexec_PROGRAMS)
GIT_VERSION_CMD = $(SHELL) $(top_srcdir)/git_version.sh
stap_CXXFLAGS = $(AM_CXXFLAGS)
stap_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_1)
-stap_LDFLAGS = $(AM_LDFLAGS) $(am__append_2)
+stap_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ $(am__append_2)
+staprun_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@
stapio_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_3)
-stapio_LDFLAGS = $(AM_LDFLAGS) $(am__append_4)
+stapio_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ $(am__append_4)
# This tells automake's "make distcheck" what we need to compile.
@BUILD_ELFUTILS_TRUE@DISTCHECK_CONFIGURE_FLAGS = --with-elfutils=$(elfutils_abs_srcdir)
@@ -1148,8 +1150,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
@@ -1174,8 +1176,8 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -1185,12 +1187,13 @@ ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
+ here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
@@ -1263,10 +1266,6 @@ dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
-dist-lzma: distdir
- tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
- $(am__remove_distdir)
-
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
@@ -1294,8 +1293,6 @@ distcheck: dist
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
- *.tar.lzma*) \
- unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
@@ -1465,7 +1462,7 @@ uninstall-man: uninstall-man1 uninstall-man5 uninstall-man8
clean-binPROGRAMS clean-generic clean-local \
clean-noinstPROGRAMS clean-pkglibexecPROGRAMS ctags \
ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-hook \
- dist-lzma dist-shar dist-tarZ dist-zip distcheck distclean \
+ dist-shar dist-tarZ dist-zip distcheck distclean \
distclean-compile distclean-generic distclean-hdr \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
diff --git a/aclocal.m4 b/aclocal.m4
index 0e2027cd..9d70920d 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.10 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# 2005, 2006 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -11,15 +11,12 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-m4_ifndef([AC_AUTOCONF_VERSION],
- [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(AC_AUTOCONF_VERSION, [2.61],,
-[m4_warning([this file was generated for autoconf 2.61.
-You have another version of autoconf. It may work, but is not guaranteed to.
-If you have problems, you may need to regenerate the build system entirely.
-To do so, use the procedure documented by the package, typically `autoreconf'.])])
+m4_if(m4_PACKAGE_VERSION, [2.61],,
+[m4_fatal([this file was generated for autoconf 2.61.
+You have another version of autoconf. If you want to use that,
+you should regenerate the build system entirely.], [63])])
-# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -34,7 +31,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.10'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.10.1], [],
+m4_if([$1], [1.10], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -50,10 +47,8 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.10.1])dnl
-m4_ifndef([AC_AUTOCONF_VERSION],
- [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
+[AM_AUTOMAKE_VERSION([1.10])dnl
+_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
@@ -348,7 +343,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# each Makefile.in and add a new line on top of each file to say so.
# Grep'ing the whole file is not good either: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
dirpart=`AS_DIRNAME("$mf")`
else
continue
@@ -396,13 +391,13 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008 Free Software Foundation, Inc.
+# 2005, 2006 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 13
+# serial 12
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
@@ -507,17 +502,16 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC],
# our stamp files there.
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
[# Compute $1's index in $config_headers.
-_am_arg=$1
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
- $_am_arg | $_am_arg:* )
+ $1 | $1:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
-echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
@@ -878,7 +872,7 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
-# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
# This macro is traced by Automake.
AC_DEFUN([_AM_SUBST_NOTMAKE])
diff --git a/configure b/configure
index 819c6f06..866e9b16 100755
--- a/configure
+++ b/configure
@@ -705,6 +705,7 @@ EGREP
U
ANSI2KNR
RANLIB
+PIELDFLAGS
sqlite3_LIBS
staplog_CPPFLAGS
BUILD_CRASHMOD_TRUE
@@ -1324,6 +1325,7 @@ Optional Features:
location).
--enable-prologues make -P prologue-searching default
--disable-ssp disable gcc stack-protector
+ --disable-pie disable position-independent-executable
--enable-sqlite build with sqlite support
--enable-crash[=DIRECTORY]
enable crash extension (default is disabled).
@@ -6007,6 +6009,67 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+# Check whether --enable-pie was given.
+if test "${enable_pie+set}" = set; then
+ enableval=$enable_pie;
+fi
+
+if test "x$enable_pie" != xno; then
+
+ save_CFLAGS="$CFLAGS"
+ save_CXXFLAGS="$CXXFLAGS"
+ save_LDFLAGS="$LDFLAGS"
+ CFLAGS="$CFLAGS -fpie"
+ CXXFLAGS="$CXXFLAGS -fpie"
+ LDFLAGS="$LDFLAGS -pie -Wl,-z,relro -Wl,-z,now"
+ cat >conftest.$ac_ext <<_ACEOF
+void main () {}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+
+ { echo "$as_me:$LINENO: Compiling with gcc pie et al." >&5
+echo "$as_me: Compiling with gcc pie et al." >&6;}
+ # LDFLAGS is special since it may be passed down to bundled-elfutils,
+ # and interfere with the .so's built therein
+ PIELDFLAGS="$LDFLAGS -pie -Wl,-z,relro -Wl,-z,now"
+ LDFLAGS="$save_LDFLAGS"
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+ { echo "$as_me:$LINENO: Compiler does not support -pie et al." >&5
+echo "$as_me: Compiler does not support -pie et al." >&6;}
+ CFLAGS="$save_CFLAGS"
+ CXXFLAGS="$save_CXXFLAGS"
+ PIELDFLAGS=""
+ LDFLAGS="$save_LDFLAGS"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+
# Check whether --enable-sqlite was given.
if test "${enable_sqlite+set}" = set; then
enableval=$enable_sqlite;
@@ -7613,12 +7676,12 @@ EGREP!$EGREP$ac_delim
U!$U$ac_delim
ANSI2KNR!$ANSI2KNR$ac_delim
RANLIB!$RANLIB$ac_delim
+PIELDFLAGS!$PIELDFLAGS$ac_delim
sqlite3_LIBS!$sqlite3_LIBS$ac_delim
staplog_CPPFLAGS!$staplog_CPPFLAGS$ac_delim
BUILD_CRASHMOD_TRUE!$BUILD_CRASHMOD_TRUE$ac_delim
BUILD_CRASHMOD_FALSE!$BUILD_CRASHMOD_FALSE$ac_delim
have_latex!$have_latex$ac_delim
-have_dvips!$have_dvips$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -7660,6 +7723,7 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
+have_dvips!$have_dvips$ac_delim
have_ps2pdf!$have_ps2pdf$ac_delim
have_latex2html!$have_latex2html$ac_delim
BUILD_DOCS_TRUE!$BUILD_DOCS_TRUE$ac_delim
@@ -7676,7 +7740,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 14; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 15; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -8077,21 +8141,22 @@ echo "$as_me: $ac_file is unchanged" >&6;}
fi
rm -f "$tmp/out12"
# Compute $ac_file's index in $config_headers.
+_am_arg=$ac_file
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
- $ac_file | $ac_file:* )
+ $_am_arg | $_am_arg:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
-echo "timestamp for $ac_file" >`$as_dirname -- $ac_file ||
-$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X$ac_file : 'X\(//\)[^/]' \| \
- X$ac_file : 'X\(//\)$' \| \
- X$ac_file : 'X\(/\)' \| . 2>/dev/null ||
-echo X$ac_file |
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$_am_arg" : 'X\(//\)[^/]' \| \
+ X"$_am_arg" : 'X\(//\)$' \| \
+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$_am_arg" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -8128,7 +8193,7 @@ echo "$as_me: executing $ac_file commands" >&6;}
# each Makefile.in and add a new line on top of each file to say so.
# Grep'ing the whole file is not good either: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
- if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
dirpart=`$as_dirname -- "$mf" ||
$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$mf" : 'X\(//\)[^/]' \| \
diff --git a/configure.ac b/configure.ac
index 51ed83a7..4d0a4263 100644
--- a/configure.ac
+++ b/configure.ac
@@ -81,6 +81,29 @@ AS_IF([test "x$enable_ssp" != xno],[
CFLAGS="$save_CFLAGS"
CXXFLAGS="$save_CXXFLAGS"])])
+AC_ARG_ENABLE([pie],
+ [AS_HELP_STRING([--disable-pie], [disable position-independent-executable])])
+AS_IF([test "x$enable_pie" != xno],[
+ save_CFLAGS="$CFLAGS"
+ save_CXXFLAGS="$CXXFLAGS"
+ save_LDFLAGS="$LDFLAGS"
+ CFLAGS="$CFLAGS -fpie"
+ CXXFLAGS="$CXXFLAGS -fpie"
+ LDFLAGS="$LDFLAGS -pie -Wl,-z,relro -Wl,-z,now"
+ AC_LINK_IFELSE([void main () {}], [
+ AC_MSG_NOTICE([Compiling with gcc pie et al.])
+ # LDFLAGS is special since it may be passed down to bundled-elfutils,
+ # and interfere with the .so's built therein
+ PIELDFLAGS="$LDFLAGS -pie -Wl,-z,relro -Wl,-z,now"
+ LDFLAGS="$save_LDFLAGS"
+ ],[
+ AC_MSG_NOTICE([Compiler does not support -pie et al.])
+ CFLAGS="$save_CFLAGS"
+ CXXFLAGS="$save_CXXFLAGS"
+ PIELDFLAGS=""
+ LDFLAGS="$save_LDFLAGS"])])
+AC_SUBST(PIELDFLAGS)
+
dnl Handle optional sqlite support. If enabled/disabled by the user,
dnl do the right thing. If not specified by the user, use it if
dnl present.
diff --git a/doc/Makefile.in b/doc/Makefile.in
index efad693b..a2700d3c 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -88,6 +88,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PIELDFLAGS = @PIELDFLAGS@
PROCFLAGS = @PROCFLAGS@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
diff --git a/main.cxx b/main.cxx
index 3d72f9e6..0b7ad5f6 100644
--- a/main.cxx
+++ b/main.cxx
@@ -497,9 +497,9 @@ main (int argc, char * const argv [])
case 's':
s.buffer_size = atoi (optarg);
- if (s.buffer_size < 1 || s.buffer_size > 64)
+ if (s.buffer_size < 1 || s.buffer_size > 4095)
{
- cerr << "Invalid buffer size (should be 1-64)." << endl;
+ cerr << "Invalid buffer size (should be 1-4095)." << endl;
usage (s, 1);
}
break;
diff --git a/runtime/ChangeLog b/runtime/ChangeLog
index 3eabede9..8410b918 100644
--- a/runtime/ChangeLog
+++ b/runtime/ChangeLog
@@ -1,3 +1,26 @@
+2008-05-05 Frank Ch. Eigler <fche@elastic.org>
+
+ PR 6481.
+ * time.c (__stp_time_timer_callback): Reenable irq's before
+ mod_timer.
+
+2008-05-05 David Smith <dsmith@redhat.com>
+
+ * task_finder.c (stap_utrace_detach_ops): Make sure we ignore
+ /sbin/init.
+ (__stp_utrace_attach): Added function to handle details of
+ attaching a utrace engine.
+ (__stp_utrace_task_finder_report_clone): Calls
+ __stp_utrace_attach.
+ (__stp_utrace_task_finder_report_exec): Ditto.
+ (stap_start_task_finder): Ditto.
+
+2008-04-30 Masami Hiramatsu <mhiramat@redhat.com>
+
+ PR 5648
+ From Shaohua Li <shaohua.li@intel.com>
+ * vsprintf.c (_stp_vsnprintf): Fix unaligned access warning on ia64.
+
2008-04-29 David Smith <dsmith@redhat.com>
* task_finder.c: Made more robust by ensuring that all utrace
diff --git a/runtime/staprun/ChangeLog b/runtime/staprun/ChangeLog
index 9e0ccb73..969c299d 100644
--- a/runtime/staprun/ChangeLog
+++ b/runtime/staprun/ChangeLog
@@ -1,3 +1,28 @@
+2008-05-05 Martin Hunt <hunt@redhat.com>
+
+ * mainloop.c (child_proc): Handle sig_chld
+ in the proper thread.
+ (signal_thread): Don't call send_request()
+ because it isn't thread-safe.
+
+2008-05-05 Martin Hunt <hunt@redhat.com>
+
+ * mainloop.c (signal_thread): New thread to handle signals
+ better.
+ (setup_main_signals): Create signal thread.
+
+2008-04-30 Masami Hiramatsu <mhiramat@redhat.com>
+
+ PR 6008
+ * common.c (parse_args): Increase the limitation of the buffer size
+ to 4095MB.
+ * common.c (usage): Ditto.
+
+2008-04-30 Masami Hiramatsu <mhiramat@redhat.com>
+
+ * stapio.c (main): Fix a typo in a debug message.
+ * staprun.c (main): Ditto.
+
2008-04-24 Frank Ch. Eigler <fche@elastic.org>
PR 6451.
diff --git a/runtime/staprun/common.c b/runtime/staprun/common.c
index b716d27f..93da51d8 100644
--- a/runtime/staprun/common.c
+++ b/runtime/staprun/common.c
@@ -58,8 +58,8 @@ void parse_args(int argc, char **argv)
break;
case 'b':
buffer_size = (unsigned)atoi(optarg);
- if (buffer_size < 1 || buffer_size > 64) {
- err("Invalid buffer size '%d' (should be 1-64).\n", buffer_size);
+ if (buffer_size < 1 || buffer_size > 4095) {
+ err("Invalid buffer size '%d' (should be 1-4095).\n", buffer_size);
usage(argv[0]);
}
break;
@@ -130,7 +130,7 @@ void usage(char *prog)
err("-o FILE Send output to FILE.\n");
err("-b buffer size The systemtap module specifies a buffer size.\n");
err(" Setting one here will override that value. The\n");
- err(" value should be an integer between 1 and 64\n");
+ err(" value should be an integer between 1 and 4095 \n");
err(" which be assumed to be the buffer size in MB.\n");
err(" That value will be per-cpu in bulk mode.\n");
err("-L Load module and start probes, then detach.\n");
diff --git a/runtime/staprun/mainloop.c b/runtime/staprun/mainloop.c
index 37a4f58a..61963743 100644
--- a/runtime/staprun/mainloop.c
+++ b/runtime/staprun/mainloop.c
@@ -16,8 +16,8 @@
/* globals */
int ncpus;
static int use_old_transport = 0;
-enum _stp_sig_type { sig_none, sig_done, sig_detach };
-static enum _stp_sig_type got_signal = sig_none;
+//enum _stp_sig_type { sig_none, sig_done, sig_detach };
+//static enum _stp_sig_type got_signal = sig_none;
/**
* send_request - send request to kernel over control channel
@@ -29,48 +29,83 @@ static enum _stp_sig_type got_signal = sig_none;
*/
int send_request(int type, void *data, int len)
{
- char buf[1024];
-
- /* Before doing memcpy, make sure 'buf' is big enough. */
- if ((len + 4) > (int)sizeof(buf)) {
- _err("exceeded maximum send_request size.\n");
- return -1;
- }
- memcpy(buf, &type, 4);
- memcpy(&buf[4], data, len);
- return write(control_channel, buf, len+4);
+ char buf[1024];
+
+ /* Before doing memcpy, make sure 'buf' is big enough. */
+ if ((len + 4) > (int)sizeof(buf)) {
+ _err("exceeded maximum send_request size.\n");
+ return -1;
+ }
+ memcpy(buf, &type, 4);
+ memcpy(&buf[4], data, len);
+ return write(control_channel, buf, len + 4);
}
+static void *signal_thread(void *arg)
+{
+ sigset_t *s = (sigset_t *) arg;
+ int signum, rc, btype = STP_EXIT;
+
+ while (1) {
+ if (sigwait(s, &signum) < 0) {
+ _perr("sigwait");
+ continue;
+ }
+ dbug(2, "sigproc %d (%s)\n", signum, strsignal(signum));
+ if (signum == SIGQUIT)
+ cleanup_and_exit(1);
+ else if (signum == SIGINT || signum == SIGHUP || signum == SIGTERM) {
+ // send STP_EXIT
+ rc = write(control_channel, &btype, sizeof(btype));
+ break;
+ }
+ }
+ return NULL;
+}
-static void sigproc(int signum)
+static void chld_proc(int signum)
{
- dbug(2, "sigproc %d (%s)\n", signum, strsignal(signum));
-
- if (signum == SIGCHLD) {
- pid_t pid = waitpid(-1, NULL, WNOHANG);
- if (pid != target_pid)
- return;
- send_request(STP_EXIT, NULL, 0);
- } else if (signum == SIGQUIT)
- got_signal = sig_detach;
- else if (signum == SIGINT || signum == SIGHUP || signum == SIGTERM)
- got_signal = sig_done;
+ int32_t rc, btype = STP_EXIT;
+ dbug(2, "chld_proc %d (%s)\n", signum, strsignal(signum));
+ pid_t pid = waitpid(-1, NULL, WNOHANG);
+ if (pid != target_pid)
+ return;
+ // send STP_EXIT
+ rc = write(control_channel, &btype, sizeof(btype));
}
-static void setup_main_signals(int cleanup)
+static void setup_main_signals(void)
{
- struct sigaction a;
- memset(&a, 0, sizeof(a));
- sigfillset(&a.sa_mask);
- if (cleanup == 0) {
- a.sa_handler = sigproc;
- sigaction(SIGCHLD, &a, NULL);
- } else
- a.sa_handler = SIG_IGN;
- sigaction(SIGINT, &a, NULL);
- sigaction(SIGTERM, &a, NULL);
- sigaction(SIGHUP, &a, NULL);
- sigaction(SIGQUIT, &a, NULL);
+ pthread_t tid;
+ struct sigaction sa;
+ sigset_t *s = malloc(sizeof(*s));
+ if (!s) {
+ _perr("malloc failed");
+ exit(1);
+ }
+ sigfillset(s);
+ pthread_sigmask(SIG_SETMASK, s, NULL);
+ memset(&sa, 0, sizeof(sa));
+ sigfillset(&sa.sa_mask);
+ sa.sa_handler = SIG_IGN;
+ sigaction(SIGINT, &sa, NULL);
+ sigaction(SIGTERM, &sa, NULL);
+ sigaction(SIGHUP, &sa, NULL);
+ sigaction(SIGQUIT, &sa, NULL);
+
+ sa.sa_handler = chld_proc;
+ sigaction(SIGCHLD, &sa, NULL);
+
+ sigemptyset(s);
+ sigaddset(s, SIGINT);
+ sigaddset(s, SIGTERM);
+ sigaddset(s, SIGHUP);
+ sigaddset(s, SIGQUIT);
+ pthread_sigmask(SIG_SETMASK, s, NULL);
+ if (pthread_create(&tid, NULL, signal_thread, s) < 0) {
+ _perr("failed to create thread");
+ exit(1);
+ }
}
/*
@@ -229,7 +264,7 @@ void cleanup_and_exit(int detach)
return;
exiting = 1;
- setup_main_signals(1);
+ setup_main_signals();
dbug(1, "detach=%d\n", detach);
@@ -272,20 +307,17 @@ int stp_main_loop(void)
char recvbuf[8196];
setvbuf(ofp, (char *)NULL, _IOLBF, 0);
- setup_main_signals(0);
+ setup_main_signals();
dbug(2, "in main loop\n");
send_request(STP_READY, NULL, 0);
- while (1) { /* handle messages from control channel */
+ /* handle messages from control channel */
+ while (1) {
nb = read(control_channel, recvbuf, sizeof(recvbuf));
dbug(2, "nb=%d\n", (int)nb);
if (nb <= 0) {
- if (got_signal == sig_done)
- send_request(STP_EXIT, NULL, 0);
- else if (got_signal == sig_detach)
- cleanup_and_exit(1);
- else if (errno != EINTR)
+ if (errno != EINTR)
_perr("Unexpected EOF in read (nb=%ld)", (long)nb);
continue;
}
diff --git a/runtime/staprun/stapio.c b/runtime/staprun/stapio.c
index b591244f..3c8c4f7f 100644
--- a/runtime/staprun/stapio.c
+++ b/runtime/staprun/stapio.c
@@ -30,7 +30,7 @@ int main(int argc, char **argv)
parse_args(argc, argv);
if (buffer_size)
- dbug(1, "Using a buffer of %u bytes.\n", buffer_size);
+ dbug(1, "Using a buffer of %u MB.\n", buffer_size);
if (optind < argc) {
parse_modpath(argv[optind++]);
diff --git a/runtime/staprun/staprun.c b/runtime/staprun/staprun.c
index ee9bdc7b..0291d01f 100644
--- a/runtime/staprun/staprun.c
+++ b/runtime/staprun/staprun.c
@@ -230,7 +230,7 @@ int main(int argc, char **argv)
parse_args(argc, argv);
if (buffer_size)
- dbug(2, "Using a buffer of %u bytes.\n", buffer_size);
+ dbug(2, "Using a buffer of %u MB.\n", buffer_size);
if (optind < argc) {
parse_modpath(argv[optind++]);
diff --git a/runtime/task_finder.c b/runtime/task_finder.c
index 915925a3..6d79c98a 100644
--- a/runtime/task_finder.c
+++ b/runtime/task_finder.c
@@ -93,6 +93,10 @@ stap_utrace_detach_ops(struct utrace_engine_ops *ops)
rcu_read_lock();
for_each_process(tsk) {
struct mm_struct *mm;
+
+ if (tsk->pid <= 1)
+ continue;
+
mm = get_task_mm(tsk);
if (mm) {
mmput(mm);
@@ -188,6 +192,45 @@ __stp_get_mm_path(struct mm_struct *mm, char *buf, int buflen)
#define __STP_UTRACE_ATTACHED_TASK_EVENTS (UTRACE_EVENT(DEATH))
+static int
+__stp_utrace_attach(struct task_struct *tsk,
+ const struct utrace_engine_ops *ops, void *data,
+ unsigned long event_flags)
+{
+ struct utrace_attached_engine *engine;
+ struct mm_struct *mm;
+ int rc = 0;
+
+ // Ignore init
+ if (tsk->pid <= 1)
+ return EPERM;
+
+ // Ignore threads with no mm (which are kernel threads).
+ mm = get_task_mm(tsk);
+ if (! mm)
+ return EPERM;
+ mmput(mm);
+
+ engine = utrace_attach(tsk, UTRACE_ATTACH_CREATE, ops, data);
+ if (IS_ERR(engine)) {
+ int error = -PTR_ERR(engine);
+ if (error != ENOENT) {
+ _stp_error("utrace_attach returned error %d on pid %d",
+ error, (int)tsk->pid);
+ rc = error;
+ }
+ }
+ else if (unlikely(engine == NULL)) {
+ _stp_error("utrace_attach returned NULL on pid %d",
+ (int)tsk->pid);
+ rc = EFAULT;
+ }
+ else {
+ utrace_set_flags(tsk, engine, event_flags);
+ }
+ return rc;
+}
+
static u32
__stp_utrace_task_finder_report_clone(struct utrace_attached_engine *engine,
struct task_struct *parent,
@@ -200,21 +243,9 @@ __stp_utrace_task_finder_report_clone(struct utrace_attached_engine *engine,
if (atomic_read(&__stp_task_finder_state) != __STP_TF_RUNNING)
return UTRACE_ACTION_RESUME;
- // On clone, attach to the child. Ignore threads with no mm
- // (which are kernel threads).
- mm = get_task_mm(child);
- if (mm) {
- mmput(mm);
- child_engine = utrace_attach(child, UTRACE_ATTACH_CREATE,
- engine->ops, 0);
- if (IS_ERR(child_engine))
- _stp_error("attach to clone child %d failed: %ld",
- (int)child->pid, PTR_ERR(child_engine));
- else {
- utrace_set_flags(child, child_engine,
- __STP_UTRACE_TASK_FINDER_EVENTS);
- }
- }
+ // On clone, attach to the child.
+ (void) __stp_utrace_attach(child, engine->ops, 0,
+ __STP_UTRACE_TASK_FINDER_EVENTS);
return UTRACE_ACTION_RESUME;
}
@@ -253,6 +284,8 @@ __stp_utrace_task_finder_report_exec(struct utrace_attached_engine *engine,
struct list_head *cb_node;
list_for_each(cb_node, &tgt->callback_list_head) {
struct stap_task_finder_target *cb_tgt;
+ int rc;
+
cb_tgt = list_entry(cb_node,
struct stap_task_finder_target,
callback_list);
@@ -269,19 +302,11 @@ __stp_utrace_task_finder_report_exec(struct utrace_attached_engine *engine,
}
// Set up thread death notification.
- engine = utrace_attach(tsk,
- UTRACE_ATTACH_CREATE,
- &cb_tgt->ops, cb_tgt);
- if (IS_ERR(engine)) {
- _stp_error("attach to exec'ed %d failed: %ld",
- (int)tsk->pid,
- PTR_ERR(engine));
- }
- else {
- utrace_set_flags(tsk, engine,
+ rc = __stp_utrace_attach(tsk, &cb_tgt->ops, cb_tgt,
__STP_UTRACE_ATTACHED_TASK_EVENTS);
- cb_tgt->engine_attached = 1;
- }
+ if (rc != 0 && rc != EPERM)
+ break;
+ cb_tgt->engine_attached = 1;
}
}
return UTRACE_ACTION_RESUME;
@@ -346,46 +371,35 @@ stap_start_task_finder(void)
}
atomic_set(&__stp_task_finder_state, __STP_TF_RUNNING);
- printk(KERN_ERR "SYSTEMTAP: in RUNNING state\n");
rcu_read_lock();
for_each_process(tsk) {
- struct utrace_attached_engine *engine;
struct mm_struct *mm;
char *mmpath;
size_t mmpathlen;
struct list_head *tgt_node;
+ /* Attach to the thread */
+ rc = __stp_utrace_attach(tsk, &__stp_utrace_task_finder_ops, 0,
+ __STP_UTRACE_TASK_FINDER_EVENTS);
+ if (rc == EPERM) {
+ /* Ignore EPERM errors, which mean this wasn't
+ * a thread we can attach to. */
+ rc = 0;
+ continue;
+ }
+ else if (rc != 0) {
+ /* If we get a real error, quit. */
+ break;
+ }
+
+ /* Grab the path associated with this task. */
mm = get_task_mm(tsk);
if (! mm) {
/* If the thread doesn't have a mm_struct, it is
* a kernel thread which we need to skip. */
continue;
}
-
- /* Attach to the thread */
- engine = utrace_attach(tsk, UTRACE_ATTACH_CREATE,
- &__stp_utrace_task_finder_ops, 0);
- if (IS_ERR(engine)) {
- int error = -PTR_ERR(engine);
- if (error != ENOENT) {
- mmput(mm);
- _stp_error("utrace_attach returned error %d on pid %d",
- error, (int)tsk->pid);
- rc = error;
- break;
- }
- }
- else if (unlikely(engine == NULL)) {
- mmput(mm);
- _stp_error("utrace_attach returned NULL on pid %d",
- (int)tsk->pid);
- rc = EFAULT;
- break;
- }
- utrace_set_flags(tsk, engine, __STP_UTRACE_TASK_FINDER_EVENTS);
-
- /* Check the thread's exe's path/pid against our list. */
mmpath = __stp_get_mm_path(mm, mmpath_buf, PATH_MAX);
mmput(mm); /* We're done with mm */
if (IS_ERR(mmpath)) {
@@ -395,6 +409,7 @@ stap_start_task_finder(void)
break;
}
+ /* Check the thread's exe's path/pid against our list. */
mmpathlen = strlen(mmpath);
list_for_each(tgt_node, &__stp_task_finder_list) {
struct stap_task_finder_target *tgt;
@@ -430,23 +445,17 @@ stap_start_task_finder(void)
}
// Set up thread death notification.
- engine = utrace_attach(tsk,
- UTRACE_ATTACH_CREATE,
- &cb_tgt->ops, cb_tgt);
- if (IS_ERR(engine)) {
- _stp_error("attach to %d failed: %ld",
- (int)tsk->pid,
- PTR_ERR(engine));
- }
- else {
- utrace_set_flags(tsk, engine,
+ rc = __stp_utrace_attach(tsk, &cb_tgt->ops,
+ cb_tgt,
__STP_UTRACE_ATTACHED_TASK_EVENTS);
- cb_tgt->engine_attached = 1;
- }
+ if (rc != 0 && rc != EPERM)
+ break;
+ cb_tgt->engine_attached = 1;
}
}
}
rcu_read_unlock();
+
_stp_kfree(mmpath_buf);
return rc;
}
diff --git a/runtime/time.c b/runtime/time.c
index 52a2edbb..8a0b6fad 100644
--- a/runtime/time.c
+++ b/runtime/time.c
@@ -131,10 +131,13 @@ __stp_time_timer_callback(unsigned long val)
time->base_cycles = cycles;
write_sequnlock(&time->lock);
+ local_irq_restore(flags);
+ /* PR6481: reenable IRQs before resetting the timer.
+ XXX: The worst that can probably happen is that we get
+ two consecutive timer resets. */
+
if (likely(stp_timer_reregister))
mod_timer(&time->timer, jiffies + 1);
-
- local_irq_restore(flags);
}
/* This is called as an IPI, with interrupts disabled. */
diff --git a/runtime/transport/ChangeLog b/runtime/transport/ChangeLog
index b0f2aee8..9d0ba162 100644
--- a/runtime/transport/ChangeLog
+++ b/runtime/transport/ChangeLog
@@ -1,3 +1,9 @@
+2008-04-30 Masami Hiramatsu <mhiramat@redhat.com>
+
+ PR 5645
+ * transport.c (_stp_transport_init): Fix subbuffer size calculation
+ overflow.
+
2008-04-21 hunt <hunt@redhat.com>
* control.c (_stp_ctl_write): Return len + sizeof(int) so
diff --git a/runtime/transport/transport.c b/runtime/transport/transport.c
index 1f9a1667..a4e4e652 100644
--- a/runtime/transport/transport.c
+++ b/runtime/transport/transport.c
@@ -225,7 +225,11 @@ int _stp_transport_init(void)
if (_stp_bufsize) {
unsigned size = _stp_bufsize * 1024 * 1024;
- _stp_subbuf_size = ((size >> 2) + 1) * 65536;
+ _stp_subbuf_size = 65536;
+ while (size / _stp_subbuf_size > 64 &&
+ _stp_subbuf_size < 1024 * 1024) {
+ _stp_subbuf_size <<= 1;
+ }
_stp_nsubbufs = size / _stp_subbuf_size;
dbug_trans(1, "Using %d subbufs of size %d\n", _stp_nsubbufs, _stp_subbuf_size);
}
diff --git a/runtime/vsprintf.c b/runtime/vsprintf.c
index 0bf625a5..dcaa1bc3 100644
--- a/runtime/vsprintf.c
+++ b/runtime/vsprintf.c
@@ -256,18 +256,18 @@ int _stp_vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
break;
case 2:
if((str + 1) <= end)
- *(int16_t *)str = (int16_t)num;
+ memcpy(str, &num, 2);
str+=2;
break;
case 4:
if((str + 3) <= end)
- *(int32_t *)str = num;
+ memcpy(str, &num, 4);
str+=4;
break;
default: // "%.8b" by default
case 8:
if((str + 7) <= end)
- *(int64_t *)str = num;
+ memcpy(str, &num, 8);
str+=8;
break;
}
diff --git a/staprun.8.in b/staprun.8.in
index 679dda0f..ca976a4a 100644
--- a/staprun.8.in
+++ b/staprun.8.in
@@ -57,7 +57,7 @@ be in percpu files FILE_x where 'x' is the cpu number.
.B \-b BUFFER_SIZE
The systemtap module will specify a buffer size.
Setting one here will override that value. The value should be
-an integer between 1 and 64 which be assumed to be the
+an integer between 1 and 4095 which be assumed to be the
buffer size in MB. That value will be per-cpu if bulk mode is used.
.TP
.B \-L
diff --git a/tapsets.cxx b/tapsets.cxx
index 4aac4488..484bc58c 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -732,7 +732,7 @@ struct dwflpp
void setup(bool kernel, bool debuginfo_needed = true)
{
// XXX: this is where the session -R parameter could come in
- static char debuginfo_path_arr[] = "-:.debug:/usr/lib/debug";
+ static char debuginfo_path_arr[] = "-:.debug:/usr/lib/debug:build";
static char *debuginfo_env_arr = getenv("SYSTEMTAP_DEBUGINFO_PATH");
static char *debuginfo_path = (debuginfo_env_arr ?
diff --git a/testsuite/systemtap.examples/ChangeLog b/testsuite/systemtap.examples/ChangeLog
index c85a43ee..ad46276c 100644
--- a/testsuite/systemtap.examples/ChangeLog
+++ b/testsuite/systemtap.examples/ChangeLog
@@ -1,3 +1,7 @@
+2008-05-01 William Cohen <wcohen@redhat.com>
+
+ * helloworld.meta: New file.
+
2008-04-27 William Cohen <wcohen@redhat.com>
* check.exp: New script to run tests on cataloged examples.
diff --git a/testsuite/systemtap.examples/helloworld.meta b/testsuite/systemtap.examples/helloworld.meta
new file mode 100644
index 00000000..f56b7ca3
--- /dev/null
+++ b/testsuite/systemtap.examples/helloworld.meta
@@ -0,0 +1,13 @@
+title: SystemTap "Hello World" Program
+name: helloworld.stp
+version: 1.0
+keywords: simple
+author: anonymous
+subsystem: none
+status: production
+exit: fixed
+output: text
+scope: system-wide
+description: A basic "Hello World" program implemented in SystemTap script. It prints out "hello world" message and then immediately exits.
+test_check: stap -p4 helloworld.stp
+test_installcheck: stap helloworld.stp -c "sleep 1"
diff --git a/translate.cxx b/translate.cxx
index 7803ff42..61bc13b8 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -4412,7 +4412,7 @@ emit_symbol_data (systemtap_session& s)
clog << endl;
}
- static char debuginfo_path_arr[] = "-:.debug:/usr/lib/debug";
+ static char debuginfo_path_arr[] = "-:.debug:/usr/lib/debug:build";
static char *debuginfo_env_arr = getenv("SYSTEMTAP_DEBUGINFO_PATH");
static char *debuginfo_path = (debuginfo_env_arr ?