From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 72721 invoked by alias); 26 Oct 2015 12:52:47 -0000 Mailing-List: contact gdb-testers-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-testers-owner@sourceware.org Received: (qmail 72710 invoked by uid 89); 26 Oct 2015 12:52:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: kwanyin.sergiodj.net Received: from kwanyin.sergiodj.net (HELO kwanyin.sergiodj.net) (176.31.208.32) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 26 Oct 2015 12:52:45 +0000 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [binutils-gdb] scm-symbol.c: Add (domain_enum) casts From: sergiodj+buildbot@redhat.com To: gdb-testers@sourceware.org Message-Id: <74ef968fbaab0bd52335314abdb3e0eb04020fb1@gdb-build> Date: Mon, 26 Oct 2015 12:52:00 -0000 X-SW-Source: 2015-q4/txt/msg02879.txt.bz2 *** TEST RESULTS FOR COMMIT 74ef968fbaab0bd52335314abdb3e0eb04020fb1 *** Author: Simon Marchi Branch: master Commit: 74ef968fbaab0bd52335314abdb3e0eb04020fb1 scm-symbol.c: Add (domain_enum) casts We currently pass integers as domain_enums to lookup_symbol. The most obvious fix is to add casts there. I first thought of changing the type of the domain variables to domain_enum. However, because we pass a pointer to them to gdbscm_parse_function_args, which expects them to be integers (because of the format string), I don't think it would be correct. If the enum does not have the same size as an int, gdbscm_parse_function_args could write past the memory of domain, overwriting something else on the stack. gdb/ChangeLog: * guile/scm-symbol.c (gdbscm_lookup_global_symbol): Add domain_enum cast. (gdbscm_lookup_symbol): Likewise.