From owner-freebsd-current@FreeBSD.ORG Tue Jun 19 21:42:56 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BCB3E16A421 for ; Tue, 19 Jun 2007 21:42:56 +0000 (UTC) (envelope-from michiel@boland.org) Received: from neerbosch.nijmegen.internl.net (neerbosch.nijmegen.internl.net [217.149.193.38]) by mx1.freebsd.org (Postfix) with ESMTP id 57D4913C469 for ; Tue, 19 Jun 2007 21:42:56 +0000 (UTC) (envelope-from michiel@boland.org) Received: from neerbosch.nijmegen.internl.net by neerbosch.nijmegen.internl.net via neerbosch.nijmegen.internl.net [217.149.193.38] with ESMTP for id l5JLgsXg006470 (8.13.4/1.4); Tue, 19 Jun 2007 23:42:54 +0200 (MEST) Received: from localhost by neerbosch.nijmegen.internl.net via mboland@localhost with ESMTP for id l5JLgsGx006466 (8.13.4/2.02); Tue, 19 Jun 2007 23:42:54 +0200 (MEST) X-Authentication-Warning: neerbosch.nijmegen.internl.net: mboland owned process doing -bs Date: Tue, 19 Jun 2007 23:42:54 +0200 (MEST) From: Michiel Boland To: freebsd-current@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: truss(1) gets confused after execve X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jun 2007 21:42:56 -0000 Hi. If i truss the following program #include extern char **environ; int main(int argc, char **argv) { execve("/usr/bin/false", argv, environ); return 1; } then everything after the execve() call is reported as garbage. E.g. something like [snip] execve("/usr/bin/false",,) execve("/usr/bin/false",,) = 0 (0x0) -- UNKNOWN SYSCALL -6040 -- (null)(0x0,0x7fffffffe880,0x0,0x0,0x0) = 198 (0xc6) -- UNKNOWN SYSCALL 5394432 -- (null)(0xc5,0x0,0x2a0,0x3,0x1000) = 73 (0x49) -- UNKNOWN SYSCALL 5394432 -- etc. Something looks not quite right here. This is -CURRENT on amd64 if that matters. Also, truss on amd64 appears to coredump if the above program is compiled with -m32. Probably because it gets the size of the argv and envp arguments wrong. Anyone looking into this yet? I could not find any relevant PRs with the word truss in the title. Cheers Michiel