From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25762 invoked by alias); 16 Sep 2008 06:28:34 -0000 Received: (qmail 25754 invoked by uid 22791); 16 Sep 2008 06:28:33 -0000 X-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,KAM_MX,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 16 Sep 2008 06:27:59 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m8G6Lrgg025781; Tue, 16 Sep 2008 02:21:53 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [10.16.255.12]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m8G6LqJI010590; Tue, 16 Sep 2008 02:21:52 -0400 Received: from localhost.localdomain (vpn-10-17.bos.redhat.com [10.16.10.17]) by mail.boston.redhat.com (8.13.1/8.13.1) with ESMTP id m8G6Loea020428; Tue, 16 Sep 2008 02:21:51 -0400 Message-ID: <48CF5058.6040807@redhat.com> Date: Tue, 16 Sep 2008 06:28:00 -0000 From: Masami Hiramatsu User-Agent: Thunderbird 2.0.0.16 (X11/20080723) MIME-Version: 1.0 To: Prerna Saxena CC: systemtap@sourceware.org Subject: Re: [RFC updated PATCH 1/2] Bug Translator 3016 : Error accessing members of anonymous structs / unions References: <48B7BE86.9070905@linux.vnet.ibm.com> <48B8722F.8010203@redhat.com> <48BEAC9D.3070300@redhat.com> <48C03355.2040103@redhat.com> <48C4EA50.8000301@linux.vnet.ibm.com> <48C546F3.4000701@redhat.com> <48CDFE69.2020803@linux.vnet.ibm.com> In-Reply-To: <48CDFE69.2020803@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2008-q3/txt/msg00668.txt.bz2 Hi Prerna, Prerna Saxena wrote: > Agree, but making "die_mem" as the 6th arg will disturb the call flow. > This is because in each recursive call, the 6th arg is overwritten by a > die which is pointed to by DW_AT_type attribute of the original > attr_mem. If die_mem is re-used as 6th arg instead of a new variable, > the old contents of die (in the parent recursive call) will also be lost > as both die & die_mem point to the same location, (whose contents would > be overwritten). This is not a problem if search in a branch has > succeeded-- but in case a search path fails and a new branch needs to be > tried, this will deem it impossible. > > I agree with your concern about "temp_die_2" being local memory on the > stack which may be reused, so I've fixed it by copying the contents of > "temp_die_2" to "die_mem" in case of a successful match. This should > take care of memory errors. Hmm, you seems right, but the below command still cause SEGV. $ stap -e 'probe module("libsas").function("sas_ex_revalidate_domain"){print($port_dev->ex_dev->children)}' -vp2 Pass 1: parsed user script and 45 library script(s) in 370usr/30sys/404real ms. Segmentation fault Would you run above command for testing & debugging? Thank you, -- Masami Hiramatsu Software Engineer Hitachi Computer Products (America) Inc. Software Solutions Division e-mail: mhiramat@redhat.com