Hello community,
here is the log from the commit of package ltrace for openSUSE:Factory checked in at 2012-12-14 09:43:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ltrace (Old)
and /work/SRC/openSUSE:Factory/.ltrace.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ltrace", Maintainer is "PBaudis@novell.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ltrace/ltrace.changes 2012-12-03 10:21:50.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ltrace.new/ltrace.changes 2012-12-14 09:43:51.000000000 +0100
@@ -1,0 +2,10 @@
+Mon Dec 10 21:18:56 UTC 2012 - schwab@linux-m68k.org
+
+- Update to 0.7.2
+ ** Bugfixes
+ *** (Again) detect VDSO entry in r_debug linkmap with non-empty name
+ *** Fix building with libunwind 1.1
+ *** Fix prototype lookup for -x symbols from shared libraries
+- Remove upstreamed patch ltrace.vdso.patch
+
+-------------------------------------------------------------------
Old:
----
ltrace-0.7.1.tar.bz2
ltrace.vdso.patch
New:
----
ltrace-0.7.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ltrace.spec ++++++
--- /var/tmp/diff_new_pack.3ECfCV/_old 2012-12-14 09:43:54.000000000 +0100
+++ /var/tmp/diff_new_pack.3ECfCV/_new 2012-12-14 09:43:54.000000000 +0100
@@ -30,14 +30,13 @@
Summary: Trace the Library and System Calls a Program Makes
License: GPL-2.0+
Group: Development/Tools/Debuggers
-Version: 0.7.1
+Version: 0.7.2
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 s390 s390x ppc ppc64 %arm x86_64 alpha ia64
Prefix: /usr
Source: ltrace-%{version}.tar.bz2
Source2: baselibs.conf
-Patch1: ltrace.vdso.patch
%description
Ltrace is a program that runs the specified command until it exits. It
@@ -51,15 +50,8 @@
This is still a work in progress, so, for example, the tracking to
child processes may fail or some things may not work as expected.
-
-
-Authors:
---------
- Juan Cespedes
-
%prep
%setup -q
-%patch1 -p1
%build
export CFLAGS="%{optflags} -Wall"
++++++ ltrace-0.7.1.tar.bz2 -> ltrace-0.7.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/Makefile.am new/ltrace-0.7.2/Makefile.am
--- old/ltrace-0.7.1/Makefile.am 2012-11-29 18:46:57.000000000 +0100
+++ new/ltrace-0.7.2/Makefile.am 2012-12-07 21:21:45.000000000 +0100
@@ -68,8 +68,6 @@
$(libsupcxx_LIBS) \
$(libstdcxx_LIBS) \
$(libunwind_LIBS) \
- $(libunwind_ptrace_LIBS) \
- $(libunwind_arch_LIBS) \
sysdeps/libos.la
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/Makefile.in new/ltrace-0.7.2/Makefile.in
--- old/ltrace-0.7.1/Makefile.in 2012-11-29 19:08:31.000000000 +0100
+++ new/ltrace-0.7.2/Makefile.in 2012-12-07 21:22:10.000000000 +0100
@@ -86,7 +86,6 @@
am__DEPENDENCIES_1 =
libltrace_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) sysdeps/libos.la
am_libltrace_la_OBJECTS = breakpoints.lo debug.lo demangle.lo dict.lo \
ltrace-elf.lo execute_program.lo handle_event.lo libltrace.lo \
@@ -305,8 +304,6 @@
libsupcxx_LIBS = @libsupcxx_LIBS@
libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
libunwind_LIBS = @libunwind_LIBS@
-libunwind_arch_LIBS = @libunwind_arch_LIBS@
-libunwind_ptrace_LIBS = @libunwind_ptrace_LIBS@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
@@ -369,8 +366,6 @@
$(libsupcxx_LIBS) \
$(libstdcxx_LIBS) \
$(libunwind_LIBS) \
- $(libunwind_ptrace_LIBS) \
- $(libunwind_arch_LIBS) \
sysdeps/libos.la
ltrace_SOURCES = \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/NEWS new/ltrace-0.7.2/NEWS
--- old/ltrace-0.7.1/NEWS 2012-11-29 18:56:20.000000000 +0100
+++ new/ltrace-0.7.2/NEWS 2012-12-07 21:21:45.000000000 +0100
@@ -1,5 +1,18 @@
-*-org-*-
-* Version 0.7.1
+* Version 0.7.2 [2012-12-07 Fri]
+** Bugfixes
+*** (Again) detect VDSO entry in r_debug linkmap with non-empty name
+ This bug caused messages like:
+ | Couldn't determine base address of linux-vdso32.so.1
+ | Couldn't load ELF object linux-vdso32.so.1: No such file or directory
+*** Fix building with libunwind 1.1
+*** Fix prototype lookup for -x symbols from shared libraries
+ Ltrace was unable to find prototypes of static symbols in shared
+ libraries. It changed the symbol name internally to the form
+ name@libfoo.so. Thus mangled, symbols were not found in config
+ files.
+
+* Version 0.7.1 [2012-11-29 Thu]
** Bugfixes
*** ltrace.conf.5 is now installed to man5 as it should be
*** [PowerPC] A header file necessary for building is now shipped
@@ -42,7 +55,7 @@
*** The hex lens can now format floating point arguments
-* Version 0.7.0
+* Version 0.7.0 [2012-11-09 Fri]
** Tracing
*** Full support for tracing multi-threaded processes
@@ -247,7 +260,7 @@
which ltrace depends on. Before singlestepping is implemented in
software, ARM is considered unsupported.
-* Version 0.6.0
+* Version 0.6.0 [2011-01-06 Thu]
** General Features
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/configure new/ltrace-0.7.2/configure
--- old/ltrace-0.7.1/configure 2012-11-29 19:08:29.000000000 +0100
+++ new/ltrace-0.7.2/configure 2012-12-07 21:22:08.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for ltrace 0.7.1.
+# Generated by GNU Autoconf 2.68 for ltrace 0.7.2.
#
# Report bugs to .
#
@@ -570,8 +570,8 @@
# Identity of this package.
PACKAGE_NAME='ltrace'
PACKAGE_TARNAME='ltrace'
-PACKAGE_VERSION='0.7.1'
-PACKAGE_STRING='ltrace 0.7.1'
+PACKAGE_VERSION='0.7.2'
+PACKAGE_STRING='ltrace 0.7.2'
PACKAGE_BUGREPORT='ltrace-devel@lists.alioth.debian.org'
PACKAGE_URL=''
@@ -624,8 +624,6 @@
USE_VALGRIND_TRUE
HAVE_VALGRIND
LIBOBJS
-libunwind_arch_LIBS
-libunwind_ptrace_LIBS
libunwind_LIBS
libstdcxx_LIBS
libsupcxx_LIBS
@@ -1311,7 +1309,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ltrace 0.7.1 to adapt to many kinds of systems.
+\`configure' configures ltrace 0.7.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1381,7 +1379,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ltrace 0.7.1:";;
+ short | recursive ) echo "Configuration of ltrace 0.7.2:";;
esac
cat <<\_ACEOF
@@ -1489,7 +1487,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ltrace configure 0.7.1
+ltrace configure 0.7.2
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2090,7 +2088,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ltrace $as_me 0.7.1, which was
+It was created by ltrace $as_me 0.7.2, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -11315,7 +11313,7 @@
# Define the identity of the package.
PACKAGE='ltrace'
- VERSION='0.7.1'
+ VERSION='0.7.2'
cat >>confdefs.h <<_ACEOF
@@ -11877,6 +11875,15 @@
$as_echo "$enable_libunwind" >&6; }
if test x"$enable_libunwind" = xyes; then
+ case "${host_cpu}" in
+ arm*|sa110) UNWIND_ARCH="arm" ;;
+ i?86) UNWIND_ARCH="x86" ;;
+ powerpc) UNWIND_ARCH="ppc32" ;;
+ powerpc64) UNWIND_ARCH="ppc64" ;;
+ mips*) UNWIND_ARCH="mips" ;;
+ *) UNWIND_ARCH="${host_cpu}" ;;
+ esac
+
saved_LDFLAGS="${LDFLAGS}"
LDFLAGS="${LDFLAGS} ${AM_LDFLAGS}"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace in -lunwind" >&5
@@ -11918,17 +11925,18 @@
if test "x$ac_cv_lib_unwind_backtrace" = xyes; then :
libunwind_LIBS=-lunwind
else
- libunwind_LIBS=
+ as_fn_error $? "Couldn't find or use libunwind." "$LINENO" 5
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _UPT_create in -lunwind-ptrace" >&5
-$as_echo_n "checking for _UPT_create in -lunwind-ptrace... " >&6; }
-if ${ac_cv_lib_unwind_ptrace__UPT_create+:} false; then :
+ as_ac_Lib=`$as_echo "ac_cv_lib_unwind-${UNWIND_ARCH}''__U${UNWIND_ARCH}_init_remote" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _U${UNWIND_ARCH}_init_remote in -lunwind-${UNWIND_ARCH}" >&5
+$as_echo_n "checking for _U${UNWIND_ARCH}_init_remote in -lunwind-${UNWIND_ARCH}... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lunwind-ptrace $LIBS"
+LIBS="-lunwind-${UNWIND_ARCH} $libunwind_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -11938,51 +11946,41 @@
#ifdef __cplusplus
extern "C"
#endif
-char _UPT_create ();
+char _U${UNWIND_ARCH}_init_remote ();
int
main ()
{
-return _UPT_create ();
+return _U${UNWIND_ARCH}_init_remote ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_unwind_ptrace__UPT_create=yes
+ eval "$as_ac_Lib=yes"
else
- ac_cv_lib_unwind_ptrace__UPT_create=no
+ eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_unwind_ptrace__UPT_create" >&5
-$as_echo "$ac_cv_lib_unwind_ptrace__UPT_create" >&6; }
-if test "x$ac_cv_lib_unwind_ptrace__UPT_create" = xyes; then :
- libunwind_ptrace_LIBS=-lunwind-ptrace
+eval ac_res=\$$as_ac_Lib
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+ libunwind_LIBS="-lunwind-${UNWIND_ARCH} $libunwind_LIBS"
else
- libunwind_ptrace_LIBS=
+ as_fn_error $? "Couldn't find or use libunwind-${UNWIND_ARCH}." "$LINENO" 5
fi
-
- case "${host_cpu}" in
- arm*|sa110) UNWIND_ARCH="arm" ;;
- i?86) UNWIND_ARCH="x86" ;;
- powerpc) UNWIND_ARCH="ppc32" ;;
- ppc64) UNWIND_ARCH="ppc64" ;;
- mips*) UNWIND_ARCH="mips" ;;
- *) UNWIND_ARCH="${host_cpu}" ;;
- esac
-
- as_ac_Lib=`$as_echo "ac_cv_lib_unwind-${UNWIND_ARCH}''__U${UNWIND_ARCH}_init_remote" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _U${UNWIND_ARCH}_init_remote in -lunwind-${UNWIND_ARCH}" >&5
-$as_echo_n "checking for _U${UNWIND_ARCH}_init_remote in -lunwind-${UNWIND_ARCH}... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _UPT_create in -lunwind-ptrace" >&5
+$as_echo_n "checking for _UPT_create in -lunwind-ptrace... " >&6; }
+if ${ac_cv_lib_unwind_ptrace__UPT_create+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lunwind-${UNWIND_ARCH} $LIBS"
+LIBS="-lunwind-ptrace $libunwind_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -11992,35 +11990,35 @@
#ifdef __cplusplus
extern "C"
#endif
-char _U${UNWIND_ARCH}_init_remote ();
+char _UPT_create ();
int
main ()
{
-return _U${UNWIND_ARCH}_init_remote ();
+return _UPT_create ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- eval "$as_ac_Lib=yes"
+ ac_cv_lib_unwind_ptrace__UPT_create=yes
else
- eval "$as_ac_Lib=no"
+ ac_cv_lib_unwind_ptrace__UPT_create=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-eval ac_res=\$$as_ac_Lib
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
- libunwind_arch_LIBS=-lunwind-${UNWIND_ARCH}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_unwind_ptrace__UPT_create" >&5
+$as_echo "$ac_cv_lib_unwind_ptrace__UPT_create" >&6; }
+if test "x$ac_cv_lib_unwind_ptrace__UPT_create" = xyes; then :
+ libunwind_LIBS="-lunwind-ptrace $libunwind_LIBS"
else
- libunwind_arch_LIBS=
+ as_fn_error $? "Couldn't find or use libunwind-ptrace." "$LINENO" 5
fi
+
$as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h
LDFLAGS="${saved_LDFLAGS}"
@@ -13181,7 +13179,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ltrace $as_me 0.7.1, which was
+This file was extended by ltrace $as_me 0.7.2, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -13247,7 +13245,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-ltrace config.status 0.7.1
+ltrace config.status 0.7.2
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/configure.ac new/ltrace-0.7.2/configure.ac
--- old/ltrace-0.7.1/configure.ac 2012-11-29 19:00:49.000000000 +0100
+++ new/ltrace-0.7.2/configure.ac 2012-12-07 21:21:45.000000000 +0100
@@ -23,7 +23,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.65)
-AC_INIT([ltrace],[0.7.1],[ltrace-devel@lists.alioth.debian.org])
+AC_INIT([ltrace],[0.7.2],[ltrace-devel@lists.alioth.debian.org])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR(libltrace.c)
AC_CONFIG_MACRO_DIR([config/m4])
@@ -154,24 +154,31 @@
AC_MSG_RESULT([$enable_libunwind])
if test x"$enable_libunwind" = xyes; then
- saved_LDFLAGS="${LDFLAGS}"
- LDFLAGS="${LDFLAGS} ${AM_LDFLAGS}"
- AC_CHECK_LIB(unwind, backtrace, libunwind_LIBS=-lunwind, libunwind_LIBS=)
- AC_SUBST(libunwind_LIBS)
- AC_CHECK_LIB(unwind-ptrace, _UPT_create, libunwind_ptrace_LIBS=-lunwind-ptrace, libunwind_ptrace_LIBS=)
- AC_SUBST(libunwind_ptrace_LIBS)
-
case "${host_cpu}" in
arm*|sa110) UNWIND_ARCH="arm" ;;
i?86) UNWIND_ARCH="x86" ;;
powerpc) UNWIND_ARCH="ppc32" ;;
- ppc64) UNWIND_ARCH="ppc64" ;;
+ powerpc64) UNWIND_ARCH="ppc64" ;;
mips*) UNWIND_ARCH="mips" ;;
*) UNWIND_ARCH="${host_cpu}" ;;
esac
- AC_CHECK_LIB(unwind-${UNWIND_ARCH}, _U${UNWIND_ARCH}_init_remote, libunwind_arch_LIBS=-lunwind-${UNWIND_ARCH}, libunwind_arch_LIBS=)
- AC_SUBST(libunwind_arch_LIBS)
+ saved_LDFLAGS="${LDFLAGS}"
+ LDFLAGS="${LDFLAGS} ${AM_LDFLAGS}"
+ AC_CHECK_LIB([unwind], [backtrace], [libunwind_LIBS=-lunwind],
+ [AC_MSG_ERROR([Couldn't find or use libunwind.])])
+
+ AC_CHECK_LIB([unwind-${UNWIND_ARCH}], [_U${UNWIND_ARCH}_init_remote],
+ [libunwind_LIBS="-lunwind-${UNWIND_ARCH} $libunwind_LIBS"],
+ [AC_MSG_ERROR([Couldn't find or use libunwind-${UNWIND_ARCH}.])],
+ [$libunwind_LIBS])
+
+ AC_CHECK_LIB([unwind-ptrace], [_UPT_create],
+ [libunwind_LIBS="-lunwind-ptrace $libunwind_LIBS"],
+ [AC_MSG_ERROR([Couldn't find or use libunwind-ptrace.])],
+ [$libunwind_LIBS])
+
+ AC_SUBST(libunwind_LIBS)
AC_DEFINE([HAVE_LIBUNWIND], [1], [we have libunwind])
LDFLAGS="${saved_LDFLAGS}"
fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/ltrace-elf.c new/ltrace-0.7.2/ltrace-elf.c
--- old/ltrace-0.7.1/ltrace-elf.c 2012-11-29 18:46:57.000000000 +0100
+++ new/ltrace-0.7.2/ltrace-elf.c 2012-12-07 21:21:45.000000000 +0100
@@ -647,7 +647,6 @@
secflags[i] = shdr.sh_flags;
}
- size_t lib_len = strlen(lib->soname);
for (i = 0; i < size; ++i) {
GElf_Sym sym;
if (gelf_getsym(symtab, i, &sym) == NULL) {
@@ -717,20 +716,13 @@
char *full_name;
int own_full_name = 1;
- if (lib->type != LT_LIBTYPE_MAIN) {
- full_name = malloc(strlen(name) + 1 + lib_len + 1);
+ if (name_copy == NULL) {
+ full_name = strdup(name);
if (full_name == NULL)
goto fail;
- sprintf(full_name, "%s@%s", name, lib->soname);
} else {
- if (name_copy == NULL) {
- full_name = strdup(name);
- if (full_name == NULL)
- goto fail;
- } else {
- full_name = name_copy;
- own_full_name = 0;
- }
+ full_name = name_copy;
+ own_full_name = 0;
}
/* Look whether we already have a symbol for this
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/options.c new/ltrace-0.7.2/options.c
--- old/ltrace-0.7.1/options.c 2012-11-29 18:46:57.000000000 +0100
+++ new/ltrace-0.7.2/options.c 2012-12-04 13:36:23.000000000 +0100
@@ -112,7 +112,7 @@
" -u USERNAME run command with the userid, groupid of username.\n"
" -V, --version output version information and exit.\n"
#if defined(HAVE_LIBUNWIND)
- " -w=NR, --where=NR print backtrace showing NR stack frames at most.\n"
+ " -w, --where=NR print backtrace showing NR stack frames at most.\n"
#endif /* defined(HAVE_LIBUNWIND) */
" -x NAME treat the global NAME like a library subroutine.\n"
"\nReport bugs to ltrace-devel@lists.alioth.debian.org\n",
@@ -426,6 +426,22 @@
free(str);
}
+static int
+parse_int(const char *optarg, char opt, int min, int max)
+{
+ char *endptr;
+ long int l = strtol(optarg, &endptr, 0);
+ if (l < min || (max != 0 && l > max)
+ || *optarg == 0 || *endptr != 0) {
+ const char *fmt = max != 0
+ ? "Invalid argument to -%c: '%s'. Use integer %d..%d.\n"
+ : "Invalid argument to -%c: '%s'. Use integer >=%d.\n";
+ fprintf(stderr, fmt, opt, optarg, min, max);
+ exit(1);
+ }
+ return (int)l;
+}
+
char **
process_options(int argc, char **argv)
{
@@ -477,10 +493,10 @@
}
switch (c) {
case 'a':
- options.align = atoi(optarg);
+ options.align = parse_int(optarg, 'a', 0, 0);
break;
case 'A':
- options.arraylen = atoi(optarg);
+ options.arraylen = parse_int(optarg, 'A', 0, 0);
break;
case 'b':
options.no_signals = 1;
@@ -549,19 +565,9 @@
case 'L':
libcalls = 0;
break;
- case 'n': {
- char *endptr;
- long int l = strtol(optarg, &endptr, 0);
- /* Arbitrary cut-off. Nobody needs to indent
- * more than, say, 8, anyway. */
- if (l < 0 || l > 20 || *optarg == 0 || *endptr != 0) {
- fprintf(stderr, "Invalid argument to -n: '%s'."
- " Use integer 0..20.\n", optarg);
- exit(1);
- }
- options.indent = (int)l;
+ case 'n':
+ options.indent = parse_int(optarg, 'n', 0, 20);
break;
- }
case 'o':
options.output = fopen(optarg, "w");
if (!options.output) {
@@ -580,7 +586,7 @@
perror("ltrace: malloc");
exit(1);
}
- tmp->pid = atoi(optarg);
+ tmp->pid = parse_int(optarg, 'p', 1, 0);
tmp->next = opt_p;
opt_p = tmp;
break;
@@ -589,7 +595,7 @@
opt_r++;
break;
case 's':
- options.strlen = atoi(optarg);
+ options.strlen = parse_int(optarg, 's', 0, 0);
break;
case 'S':
options.syscalls = 1;
@@ -612,7 +618,7 @@
break;
#if defined(HAVE_LIBUNWIND)
case 'w':
- options.bt_depth = atoi(optarg);
+ options.bt_depth = parse_int(optarg, 'w', 1, 0);
break;
#endif /* defined(HAVE_LIBUNWIND) */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/output.c new/ltrace-0.7.2/output.c
--- old/ltrace-0.7.1/output.c 2012-11-29 18:56:20.000000000 +0100
+++ new/ltrace-0.7.2/output.c 2012-12-07 21:21:45.000000000 +0100
@@ -442,8 +442,10 @@
begin_of_line(proc, type == LT_TOF_FUNCTION, 1);
if (!options.hide_caller && libsym->lib != NULL
&& libsym->plt_type != LS_TOPLT_NONE)
- current_column += fprintf(options.output, "%s->",
- libsym->lib->soname);
+ /* We don't terribly mind failing this. */
+ account_output(¤t_column,
+ fprintf(options.output, "%s->",
+ libsym->lib->soname));
const char *name = function_name;
#ifdef USE_DEMANGLE
@@ -451,12 +453,25 @@
name = my_demangle(function_name);
#endif
if (account_output(¤t_column,
- fprintf(options.output, "%s(", name)) < 0)
+ fprintf(options.output, "%s", name)) < 0)
return;
+ if (libsym->lib != NULL
+ && libsym->lib->type != LT_LIBTYPE_MAIN
+ && libsym->plt_type == LS_TOPLT_NONE
+ && account_output(¤t_column,
+ fprintf(options.output, "@%s",
+ libsym->lib->soname)) < 0)
+ /* We do mind failing this though. */
+ return;
+
+ account_output(¤t_column, fprintf(options.output, "("));
+
func = name2func(function_name);
- if (func == NULL)
+ if (func == NULL) {
+ account_output(¤t_column, fprintf(options.output, "???"));
return;
+ }
struct fetch_context *context = fetch_arg_init(type, proc,
func->return_info);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/sysdeps/Makefile.in new/ltrace-0.7.2/sysdeps/Makefile.in
--- old/ltrace-0.7.1/sysdeps/Makefile.in 2012-11-29 19:08:31.000000000 +0100
+++ new/ltrace-0.7.2/sysdeps/Makefile.in 2012-12-07 21:22:09.000000000 +0100
@@ -220,8 +220,6 @@
libsupcxx_LIBS = @libsupcxx_LIBS@
libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
libunwind_LIBS = @libunwind_LIBS@
-libunwind_arch_LIBS = @libunwind_arch_LIBS@
-libunwind_ptrace_LIBS = @libunwind_ptrace_LIBS@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/sysdeps/linux-gnu/Makefile.in new/ltrace-0.7.2/sysdeps/linux-gnu/Makefile.in
--- old/ltrace-0.7.1/sysdeps/linux-gnu/Makefile.in 2012-11-29 19:08:31.000000000 +0100
+++ new/ltrace-0.7.2/sysdeps/linux-gnu/Makefile.in 2012-12-07 21:22:10.000000000 +0100
@@ -239,8 +239,6 @@
libsupcxx_LIBS = @libsupcxx_LIBS@
libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
libunwind_LIBS = @libunwind_LIBS@
-libunwind_arch_LIBS = @libunwind_arch_LIBS@
-libunwind_ptrace_LIBS = @libunwind_ptrace_LIBS@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/sysdeps/linux-gnu/alpha/Makefile.in new/ltrace-0.7.2/sysdeps/linux-gnu/alpha/Makefile.in
--- old/ltrace-0.7.1/sysdeps/linux-gnu/alpha/Makefile.in 2012-11-29 19:08:31.000000000 +0100
+++ new/ltrace-0.7.2/sysdeps/linux-gnu/alpha/Makefile.in 2012-12-07 21:22:10.000000000 +0100
@@ -202,8 +202,6 @@
libsupcxx_LIBS = @libsupcxx_LIBS@
libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
libunwind_LIBS = @libunwind_LIBS@
-libunwind_arch_LIBS = @libunwind_arch_LIBS@
-libunwind_ptrace_LIBS = @libunwind_ptrace_LIBS@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/sysdeps/linux-gnu/arm/Makefile.in new/ltrace-0.7.2/sysdeps/linux-gnu/arm/Makefile.in
--- old/ltrace-0.7.1/sysdeps/linux-gnu/arm/Makefile.in 2012-11-29 19:08:31.000000000 +0100
+++ new/ltrace-0.7.2/sysdeps/linux-gnu/arm/Makefile.in 2012-12-07 21:22:10.000000000 +0100
@@ -202,8 +202,6 @@
libsupcxx_LIBS = @libsupcxx_LIBS@
libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
libunwind_LIBS = @libunwind_LIBS@
-libunwind_arch_LIBS = @libunwind_arch_LIBS@
-libunwind_ptrace_LIBS = @libunwind_ptrace_LIBS@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/sysdeps/linux-gnu/cris/Makefile.in new/ltrace-0.7.2/sysdeps/linux-gnu/cris/Makefile.in
--- old/ltrace-0.7.1/sysdeps/linux-gnu/cris/Makefile.in 2012-11-29 19:08:31.000000000 +0100
+++ new/ltrace-0.7.2/sysdeps/linux-gnu/cris/Makefile.in 2012-12-07 21:22:10.000000000 +0100
@@ -202,8 +202,6 @@
libsupcxx_LIBS = @libsupcxx_LIBS@
libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
libunwind_LIBS = @libunwind_LIBS@
-libunwind_arch_LIBS = @libunwind_arch_LIBS@
-libunwind_ptrace_LIBS = @libunwind_ptrace_LIBS@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/sysdeps/linux-gnu/ia64/Makefile.in new/ltrace-0.7.2/sysdeps/linux-gnu/ia64/Makefile.in
--- old/ltrace-0.7.1/sysdeps/linux-gnu/ia64/Makefile.in 2012-11-29 19:08:31.000000000 +0100
+++ new/ltrace-0.7.2/sysdeps/linux-gnu/ia64/Makefile.in 2012-12-07 21:22:10.000000000 +0100
@@ -203,8 +203,6 @@
libsupcxx_LIBS = @libsupcxx_LIBS@
libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
libunwind_LIBS = @libunwind_LIBS@
-libunwind_arch_LIBS = @libunwind_arch_LIBS@
-libunwind_ptrace_LIBS = @libunwind_ptrace_LIBS@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/sysdeps/linux-gnu/m68k/Makefile.in new/ltrace-0.7.2/sysdeps/linux-gnu/m68k/Makefile.in
--- old/ltrace-0.7.1/sysdeps/linux-gnu/m68k/Makefile.in 2012-11-29 19:08:31.000000000 +0100
+++ new/ltrace-0.7.2/sysdeps/linux-gnu/m68k/Makefile.in 2012-12-07 21:22:10.000000000 +0100
@@ -202,8 +202,6 @@
libsupcxx_LIBS = @libsupcxx_LIBS@
libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
libunwind_LIBS = @libunwind_LIBS@
-libunwind_arch_LIBS = @libunwind_arch_LIBS@
-libunwind_ptrace_LIBS = @libunwind_ptrace_LIBS@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/sysdeps/linux-gnu/mipsel/Makefile.in new/ltrace-0.7.2/sysdeps/linux-gnu/mipsel/Makefile.in
--- old/ltrace-0.7.1/sysdeps/linux-gnu/mipsel/Makefile.in 2012-11-29 19:08:31.000000000 +0100
+++ new/ltrace-0.7.2/sysdeps/linux-gnu/mipsel/Makefile.in 2012-12-07 21:22:10.000000000 +0100
@@ -202,8 +202,6 @@
libsupcxx_LIBS = @libsupcxx_LIBS@
libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
libunwind_LIBS = @libunwind_LIBS@
-libunwind_arch_LIBS = @libunwind_arch_LIBS@
-libunwind_ptrace_LIBS = @libunwind_ptrace_LIBS@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/sysdeps/linux-gnu/ppc/Makefile.in new/ltrace-0.7.2/sysdeps/linux-gnu/ppc/Makefile.in
--- old/ltrace-0.7.1/sysdeps/linux-gnu/ppc/Makefile.in 2012-11-29 19:08:31.000000000 +0100
+++ new/ltrace-0.7.2/sysdeps/linux-gnu/ppc/Makefile.in 2012-12-07 21:22:10.000000000 +0100
@@ -202,8 +202,6 @@
libsupcxx_LIBS = @libsupcxx_LIBS@
libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
libunwind_LIBS = @libunwind_LIBS@
-libunwind_arch_LIBS = @libunwind_arch_LIBS@
-libunwind_ptrace_LIBS = @libunwind_ptrace_LIBS@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/sysdeps/linux-gnu/ppc/trace.c new/ltrace-0.7.2/sysdeps/linux-gnu/ppc/trace.c
--- old/ltrace-0.7.1/sysdeps/linux-gnu/ppc/trace.c 2012-11-29 18:46:57.000000000 +0100
+++ new/ltrace-0.7.2/sysdeps/linux-gnu/ppc/trace.c 2012-12-04 13:36:23.000000000 +0100
@@ -29,6 +29,8 @@
#include
#include
#include
+#include
+#include
#include "backend.h"
#include "breakpoint.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/sysdeps/linux-gnu/proc.c new/ltrace-0.7.2/sysdeps/linux-gnu/proc.c
--- old/ltrace-0.7.1/sysdeps/linux-gnu/proc.c 2012-11-29 18:46:57.000000000 +0100
+++ new/ltrace-0.7.2/sysdeps/linux-gnu/proc.c 2012-12-04 13:36:23.000000000 +0100
@@ -521,7 +521,9 @@
* kludge is about the best that we can do. */
if (*lib_name == 0
|| strcmp(lib_name, "linux-vdso.so.1") == 0
- || strcmp(lib_name, "linux-gate.so.1") == 0)
+ || strcmp(lib_name, "linux-gate.so.1") == 0
+ || strcmp(lib_name, "linux-vdso32.so.1") == 0
+ || strcmp(lib_name, "linux-vdso64.so.1") == 0)
continue;
/* Do we have that library already? */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/sysdeps/linux-gnu/s390/Makefile.in new/ltrace-0.7.2/sysdeps/linux-gnu/s390/Makefile.in
--- old/ltrace-0.7.1/sysdeps/linux-gnu/s390/Makefile.in 2012-11-29 19:08:31.000000000 +0100
+++ new/ltrace-0.7.2/sysdeps/linux-gnu/s390/Makefile.in 2012-12-07 21:22:10.000000000 +0100
@@ -202,8 +202,6 @@
libsupcxx_LIBS = @libsupcxx_LIBS@
libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
libunwind_LIBS = @libunwind_LIBS@
-libunwind_arch_LIBS = @libunwind_arch_LIBS@
-libunwind_ptrace_LIBS = @libunwind_ptrace_LIBS@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/sysdeps/linux-gnu/sparc/Makefile.in new/ltrace-0.7.2/sysdeps/linux-gnu/sparc/Makefile.in
--- old/ltrace-0.7.1/sysdeps/linux-gnu/sparc/Makefile.in 2012-11-29 19:08:31.000000000 +0100
+++ new/ltrace-0.7.2/sysdeps/linux-gnu/sparc/Makefile.in 2012-12-07 21:22:10.000000000 +0100
@@ -202,8 +202,6 @@
libsupcxx_LIBS = @libsupcxx_LIBS@
libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
libunwind_LIBS = @libunwind_LIBS@
-libunwind_arch_LIBS = @libunwind_arch_LIBS@
-libunwind_ptrace_LIBS = @libunwind_ptrace_LIBS@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/sysdeps/linux-gnu/x86/Makefile.in new/ltrace-0.7.2/sysdeps/linux-gnu/x86/Makefile.in
--- old/ltrace-0.7.1/sysdeps/linux-gnu/x86/Makefile.in 2012-11-29 19:08:31.000000000 +0100
+++ new/ltrace-0.7.2/sysdeps/linux-gnu/x86/Makefile.in 2012-12-07 21:22:10.000000000 +0100
@@ -202,8 +202,6 @@
libsupcxx_LIBS = @libsupcxx_LIBS@
libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
libunwind_LIBS = @libunwind_LIBS@
-libunwind_arch_LIBS = @libunwind_arch_LIBS@
-libunwind_ptrace_LIBS = @libunwind_ptrace_LIBS@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/testsuite/Makefile.in new/ltrace-0.7.2/testsuite/Makefile.in
--- old/ltrace-0.7.1/testsuite/Makefile.in 2012-11-29 19:08:31.000000000 +0100
+++ new/ltrace-0.7.2/testsuite/Makefile.in 2012-12-07 21:22:10.000000000 +0100
@@ -220,8 +220,6 @@
libsupcxx_LIBS = @libsupcxx_LIBS@
libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
libunwind_LIBS = @libunwind_LIBS@
-libunwind_arch_LIBS = @libunwind_arch_LIBS@
-libunwind_ptrace_LIBS = @libunwind_ptrace_LIBS@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/testsuite/ltrace.main/Makefile.in new/ltrace-0.7.2/testsuite/ltrace.main/Makefile.in
--- old/ltrace-0.7.1/testsuite/ltrace.main/Makefile.in 2012-11-29 19:08:31.000000000 +0100
+++ new/ltrace-0.7.2/testsuite/ltrace.main/Makefile.in 2012-12-07 21:22:10.000000000 +0100
@@ -177,8 +177,6 @@
libsupcxx_LIBS = @libsupcxx_LIBS@
libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
libunwind_LIBS = @libunwind_LIBS@
-libunwind_arch_LIBS = @libunwind_arch_LIBS@
-libunwind_ptrace_LIBS = @libunwind_ptrace_LIBS@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/testsuite/ltrace.main/parameters2.exp new/ltrace-0.7.2/testsuite/ltrace.main/parameters2.exp
--- old/ltrace-0.7.1/testsuite/ltrace.main/parameters2.exp 2012-11-29 18:56:20.000000000 +0100
+++ new/ltrace-0.7.2/testsuite/ltrace.main/parameters2.exp 2012-12-07 21:21:45.000000000 +0100
@@ -119,16 +119,19 @@
}
}]]] {->ll\({ 9, { 8, { 7, { 6, { 5, \.\.\. } } } } }\) *= <void>} == 1
-proc ltraceParamTest {conf cdecl libcode maincode match} {
+proc ltraceParamTest {conf cdecl libcode maincode match {params ""}} {
set conffile [ltraceSource conf $conf]
set lib [ltraceCompile liblib.so [ltraceSource c [concat $cdecl $libcode]]]
set bin [ltraceCompile {} $lib \
[ltraceSource c \
[concat $cdecl "int main(void) {" $maincode "}"]]]
- return [ltraceMatch [ltraceRun -F $conffile -- $bin] $match]
+ set command [concat "ltraceRun -F $conffile " $params "-- $bin"]
+ return [ltraceMatch [eval $command] $match]
}
+# Test using lens in typedef.
+
ltraceParamTest {
typedef hexptr = hex(uint*);
void fun(hexptr);
@@ -143,6 +146,8 @@
{{fun\(0x123\) *= <void>} == 1}
}
+# Test support for bitvec lens.
+
ltraceParamTest {
void fun(bitvec(uint));
void fun2(bitvec(array(char, 32)*));
@@ -170,6 +175,8 @@
{{fun2\(<8-15,255>\) *= <void>} == 1}
}
+# Test support for hex(float), hex(double).
+
ltraceParamTest {
hex(float) hex_float(hex(float));
hex(double) hex_double(hex(double));
@@ -187,4 +194,22 @@
{{hex_double\(0x1.8p\+0\) *= 0x1.4p\+1} == 1}
}
+# Test that -x fun can find "fun" prototype even if "fun" is in a
+# library.
+
+ltraceParamTest {
+ void fun();
+} {
+ void libfun(void);
+} {
+ void fun(void) {}
+ void libfun(void) { fun(); }
+} {
+ libfun();
+} {
+ {{fun@.*\(\)} == 1}
+} {
+ -L -x fun
+}
+
ltraceDone
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/testsuite/ltrace.minor/Makefile.in new/ltrace-0.7.2/testsuite/ltrace.minor/Makefile.in
--- old/ltrace-0.7.1/testsuite/ltrace.minor/Makefile.in 2012-11-29 19:08:31.000000000 +0100
+++ new/ltrace-0.7.2/testsuite/ltrace.minor/Makefile.in 2012-12-07 21:22:10.000000000 +0100
@@ -177,8 +177,6 @@
libsupcxx_LIBS = @libsupcxx_LIBS@
libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
libunwind_LIBS = @libunwind_LIBS@
-libunwind_arch_LIBS = @libunwind_arch_LIBS@
-libunwind_ptrace_LIBS = @libunwind_ptrace_LIBS@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/testsuite/ltrace.torture/Makefile.in new/ltrace-0.7.2/testsuite/ltrace.torture/Makefile.in
--- old/ltrace-0.7.1/testsuite/ltrace.torture/Makefile.in 2012-11-29 19:08:31.000000000 +0100
+++ new/ltrace-0.7.2/testsuite/ltrace.torture/Makefile.in 2012-12-07 21:22:10.000000000 +0100
@@ -177,8 +177,6 @@
libsupcxx_LIBS = @libsupcxx_LIBS@
libunwind_LD_LIBRARY_PATH = @libunwind_LD_LIBRARY_PATH@
libunwind_LIBS = @libunwind_LIBS@
-libunwind_arch_LIBS = @libunwind_arch_LIBS@
-libunwind_ptrace_LIBS = @libunwind_ptrace_LIBS@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ltrace-0.7.1/vect.c new/ltrace-0.7.2/vect.c
--- old/ltrace-0.7.1/vect.c 2012-11-29 18:56:20.000000000 +0100
+++ new/ltrace-0.7.2/vect.c 2012-12-07 21:21:45.000000000 +0100
@@ -89,6 +89,8 @@
{
if (count > vec->allocated) {
size_t na = vec->allocated != 0 ? 2 * vec->allocated : 4;
+ while (na < count)
+ na *= 2;
void *n = realloc(vec->data, na * vec->elt_size);
if (n == NULL)
return -1;
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org