From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10036 invoked by alias); 11 Aug 2007 20:43:25 -0000 Received: (qmail 9811 invoked by uid 22791); 11 Aug 2007 20:43:23 -0000 X-Spam-Check-By: sourceware.org Received: from b.mail.sonic.net (HELO b.mail.sonic.net) (64.142.19.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 11 Aug 2007 20:43:22 +0000 Received: from webmail.sonic.net (b.webmail.sonic.net [64.142.100.148]) by b.mail.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id l7BKhIPx027501; Sat, 11 Aug 2007 13:43:18 -0700 Received: from 12.7.175.2 (SquirrelMail authenticated user msnyder) by webmail.sonic.net with HTTP; Sat, 11 Aug 2007 13:43:18 -0700 (PDT) Message-ID: <19577.12.7.175.2.1186864998.squirrel@webmail.sonic.net> Date: Sat, 11 Aug 2007 20:43:00 -0000 Subject: [PATCH] ada-lang, possible_user_operator_p, null pointer From: msnyder@sonic.net To: gdb-patches@sourceware.org Cc: brobecker@adacore.com User-Agent: SquirrelMail/1.4.9a MIME-Version: 1.0 Content-Type: multipart/mixed;boundary="----=_20070811134318_33414" Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-08/txt/msg00246.txt.bz2 ------=_20070811134318_33414 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-length: 231 If type1 is null (which is checked for earlier), this line will dereference it. Also, I'm not sure what the CONCAT operator is, but is it possible that the OR at the beginning of the same line should be an AND? Just checking... ------=_20070811134318_33414 Content-Type: text/plain; name="56.txt" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="56.txt" Content-length: 1254 2007-08-11 Michael Snyder * ada-lang.c (possible_user_operator_p): Guard against NULL. Index: ada-lang.c =================================================================== RCS file: /cvs/src/src/gdb/ada-lang.c,v retrieving revision 1.100 diff -p -r1.100 ada-lang.c *** ada-lang.c 6 Aug 2007 20:07:44 -0000 1.100 --- ada-lang.c 11 Aug 2007 20:39:20 -0000 *************** possible_user_operator_p (enum exp_opcod *** 3536,3542 **** ((TYPE_CODE (type0) != TYPE_CODE_ARRAY && (TYPE_CODE (type0) != TYPE_CODE_PTR || TYPE_CODE (TYPE_TARGET_TYPE (type0)) != TYPE_CODE_ARRAY)) ! || (TYPE_CODE (type1) != TYPE_CODE_ARRAY && (TYPE_CODE (type1) != TYPE_CODE_PTR || (TYPE_CODE (TYPE_TARGET_TYPE (type1)) != TYPE_CODE_ARRAY)))); --- 3536,3542 ---- ((TYPE_CODE (type0) != TYPE_CODE_ARRAY && (TYPE_CODE (type0) != TYPE_CODE_PTR || TYPE_CODE (TYPE_TARGET_TYPE (type0)) != TYPE_CODE_ARRAY)) ! || (type1 != NULL && TYPE_CODE (type1) != TYPE_CODE_ARRAY && (TYPE_CODE (type1) != TYPE_CODE_PTR || (TYPE_CODE (TYPE_TARGET_TYPE (type1)) != TYPE_CODE_ARRAY)))); ------=_20070811134318_33414--