From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9563 invoked by alias); 9 May 2006 18:29:55 -0000 Received: (qmail 9556 invoked by uid 22791); 9 May 2006 18:29:55 -0000 X-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from e35.co.us.ibm.com (HELO e35.co.us.ibm.com) (32.97.110.153) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 09 May 2006 18:29:52 +0000 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11]) by e35.co.us.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id k49IToZU028908 for ; Tue, 9 May 2006 14:29:50 -0400 Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.8) with ESMTP id k49IToUi236502 for ; Tue, 9 May 2006 12:29:50 -0600 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.12.11/8.13.3) with ESMTP id k49IToav004484 for ; Tue, 9 May 2006 12:29:50 -0600 Received: from [9.47.22.138] (dyn9047022138.beaverton.ibm.com [9.47.22.138]) by d03av01.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id k49ITnN5004439; Tue, 9 May 2006 12:29:49 -0600 Message-ID: <4460DF9D.6040504@us.ibm.com> Date: Tue, 09 May 2006 18:29:00 -0000 From: Hien Nguyen User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Stone, Joshua I" CC: SystemTAP , "Nguyen, Thang P" Subject: Re: nightly test result of systemtap in ppc64 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2006-q2/txt/msg00361.txt.bz2 Stone, Joshua I wrote: >On Tuesday, May 09, 2006 11:02 AM, Hien Nguyen wrote: > > >>I initialized *ptr=NULL to get pass the compiler. >> >> > >Sure, but I would like to know why that error was reported in the first >place. As far as I can see, there's no way for 'ptr' to be used >uninitialized. If I'm missing something, then your fix just means that >we'll induce a NULL dereference if there's a problem. > > >Josh > > Here it is 46121 void function_probefunc (struct context* __restrict__ c) { 46122 struct function_probefunc_locals * __restrict__ l = 46123 & c->locals[c->nesting].function_probefunc; 46124 (void) l; 46125 #define CONTEXT c 46126 #define THIS l 46127 if (0) goto out; 46128 l->__retvalue[0] = '\0'; 46129 { 46130 /* pure */ 46131 char *dst, *ptr, *start; 46132 String str; 46133 int len = MAXSTRINGLEN; 46134 46135 start = strstr(CONTEXT->probe_point, "function(\""); 46136 if (start) { 46137 ptr = start + 10; 46138 } else { 46139 start = strstr(CONTEXT->probe_point, "inline(\""); 46140 if (start) { 46141 ptr = start + 8; 46142 } 46143 } 46144 if (start) { 46145 dst = THIS->__retvalue; 46146 while (*ptr != '@' && --len > 0 && *ptr) 46147 *dst++ = *ptr++; 46148 *dst = 0; 46149 goto out; 46150 } 46151 if (CONTEXT->regs) { 46152 str = _stp_string_init (0); 46153 _stp_symbol_sprint(str, REG_IP(CONTEXT->regs)); 46154 start = strstr(_stp_string_ptr(str), " : "); 46155 if (start) { 46156 dst = THIS->__retvalue; 46157 ptr = start+3; 46158 while (*ptr != '+' && --len > 0 && *ptr) 46159 *dst++ = *ptr++; 46160 *dst = 0; 46161 } 46162 else { 46163 strlcpy(THIS->__retvalue, _stp_string_ptr(str),M AXSTRINGLEN); 46164 } 46165 goto out; 46166 } 46167 THIS->__retvalue[0] = '\0'; 46168 46169 }