This commit is contained in:
parent
6c92bfc5d5
commit
6692213d21
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 5 15:09:10 CEST 2008 - schwab@suse.de
|
||||
|
||||
- Add fix for vfork handling.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 22 09:47:31 CEST 2008 - schwab@suse.de
|
||||
|
||||
|
17
strace.spec
17
strace.spec
@ -2,9 +2,16 @@
|
||||
# spec file for package strace (Version 4.5.17)
|
||||
#
|
||||
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
@ -16,10 +23,11 @@ License: BSD 3-Clause
|
||||
Group: Development/Tools/Debuggers
|
||||
AutoReqProv: on
|
||||
Version: 4.5.17
|
||||
Release: 1
|
||||
Release: 9
|
||||
Summary: A utility to trace the system calls of a program
|
||||
Source: strace-%{version}.tar.bz2
|
||||
Patch: strace-%{version}.diff
|
||||
Patch1: vfork.diff
|
||||
Url: http://sourceforge.net/projects/strace/
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
@ -39,6 +47,7 @@ Authors:
|
||||
%prep
|
||||
%setup -q
|
||||
%patch
|
||||
%patch1
|
||||
|
||||
%build
|
||||
export CFLAGS="$RPM_OPT_FLAGS"
|
||||
@ -62,6 +71,8 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%doc %{_mandir}/man1/strace.1.gz
|
||||
|
||||
%changelog
|
||||
* Tue Aug 05 2008 schwab@suse.de
|
||||
- Add fix for vfork handling.
|
||||
* Tue Jul 22 2008 schwab@suse.de
|
||||
- Update to strace 4.5.16.
|
||||
* Many bug fixes.
|
||||
|
109
vfork.diff
Normal file
109
vfork.diff
Normal file
@ -0,0 +1,109 @@
|
||||
From nobody Tue Aug 5 14:41:39 2008
|
||||
From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Subject: [patch] ia64 vfork() fix #2
|
||||
To: strace-devel@lists.sourceforge.net
|
||||
Date: Tue, 5 Aug 2008 13:51:18 +0200
|
||||
|
||||
|
||||
--gatW/ieO32f1wygP
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Disposition: inline
|
||||
|
||||
Hi,
|
||||
|
||||
the original fix of a hang of vfork() tracing with -f was posted here:
|
||||
http://sourceforge.net/mailarchive/message.php?msg_name=20080630132558.GA4346%40host0.dyn.jankratochvil.net
|
||||
|
||||
Unfortunately it did convert vfork() into (+/-) pthread_create() instead of
|
||||
intended fork(). It brought no regressions but the fix was incomplete as
|
||||
there was a race possibly causing a crash when the child waited too long:
|
||||
|
||||
clone(Process 944 attached (waiting for parent)
|
||||
Process 944 resumed (parent 942 ready)
|
||||
child_stack=0, flags=CLONE_VM|CLONE_VFORK|SIGCHLD) = 944
|
||||
[pid 942] exit_group(0) = ?
|
||||
--- SIGSEGV (Segmentation fault) @ 200000000010ccb1 (58) ---
|
||||
Process 944 detached
|
||||
|
||||
Fixed by this patch. I hope the fix commit is OK when the original patch was
|
||||
already accepted.
|
||||
|
||||
|
||||
Sorry,
|
||||
Jan
|
||||
|
||||
--gatW/ieO32f1wygP
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Disposition: inline; filename="strace-4.5.16-ia64-vfork-vm.patch"
|
||||
|
||||
2008-08-05 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* util.c (CLONE_VM): Define if not defined already.
|
||||
(setbpt): Clear CLONE_VM in the case we already clear CLONE_VFORK for
|
||||
SYS_clone and SYS_clone2.
|
||||
Reported by Michal Nowak.
|
||||
Fixes RH#455078.
|
||||
|
||||
--- util.c 18 Jul 2008 01:19:36 -0000 1.77
|
||||
+++ util.c 5 Aug 2008 08:54:14 -0000
|
||||
@@ -1284,6 +1284,9 @@ struct tcb *tcp;
|
||||
#ifndef CLONE_VFORK
|
||||
# define CLONE_VFORK 0x00004000
|
||||
#endif
|
||||
+#ifndef CLONE_VM
|
||||
+# define CLONE_VM 0x00000100
|
||||
+#endif
|
||||
#ifndef CLONE_STOPPED
|
||||
# define CLONE_STOPPED 0x02000000
|
||||
#endif
|
||||
@@ -1533,15 +1536,19 @@ struct tcb *tcp;
|
||||
#ifdef SYS_clone2
|
||||
case SYS_clone2:
|
||||
#endif
|
||||
- /* ia64 calls directly `clone (CLONE_VFORK)' contrary to
|
||||
- x86 SYS_vfork above. Even on x86 we turn the vfork
|
||||
- semantics into plain fork - each application must not
|
||||
- depend on the vfork specifics according to POSIX. We
|
||||
- would hang waiting for the parent resume otherwise. */
|
||||
+ /* ia64 calls directly `clone (CLONE_VFORK | CLONE_VM)'
|
||||
+ contrary to x86 SYS_vfork above. Even on x86 we turn the
|
||||
+ vfork semantics into plain fork - each application must not
|
||||
+ depend on the vfork specifics according to POSIX. We would
|
||||
+ hang waiting for the parent resume otherwise. We need to
|
||||
+ clear also CLONE_VM but only in the CLONE_VFORK case as
|
||||
+ otherwise we would break pthread_create. */
|
||||
+
|
||||
if ((arg_setup (tcp, &state) < 0
|
||||
|| set_arg0 (tcp, &state,
|
||||
(tcp->u_arg[arg0_index] | CLONE_PTRACE)
|
||||
- & ~CLONE_VFORK) < 0
|
||||
+ & ~(tcp->u_arg[arg0_index] & CLONE_VFORK
|
||||
+ ? CLONE_VFORK | CLONE_VM : 0)) < 0
|
||||
|| arg_finish_change (tcp, &state) < 0))
|
||||
return -1;
|
||||
tcp->flags |= TCB_BPTSET;
|
||||
|
||||
--gatW/ieO32f1wygP
|
||||
Content-Type: text/plain; charset="us-ascii"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: inline
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
|
||||
Build the coolest Linux based applications with Moblin SDK & win great prizes
|
||||
Grand prize is a trip for two to an Open Source event anywhere in the world
|
||||
http://moblin-contest.org/redirect.php?banner_id=100&url=/
|
||||
--gatW/ieO32f1wygP
|
||||
Content-Type: text/plain; charset="us-ascii"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: inline
|
||||
|
||||
_______________________________________________
|
||||
Strace-devel mailing list
|
||||
Strace-devel@lists.sourceforge.net
|
||||
https://lists.sourceforge.net/lists/listinfo/strace-devel
|
||||
|
||||
--gatW/ieO32f1wygP--
|
||||
|
Loading…
x
Reference in New Issue
Block a user