From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24568 invoked by alias); 19 Feb 2013 15:22:44 -0000 Received: (qmail 24543 invoked by uid 48); 19 Feb 2013 15:22:43 -0000 From: "palves at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/15161] New: symfile.c:struct load_section_data::load_offset is "unsigned long" but should be wider. Date: Tue, 19 Feb 2013 15:22:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: palves at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2013-q1/txt/msg00257.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=15161 Bug #: 15161 Summary: symfile.c:struct load_section_data::load_offset is "unsigned long" but should be wider. Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: gdb AssignedTo: unassigned@sourceware.org ReportedBy: palves@redhat.com Classification: Unclassified symfile.c has: /* Opaque data for load_section_callback. */ struct load_section_data { unsigned long load_offset; struct load_progress_data *progress_data; VEC(memory_write_request_s) *requests; }; static void load_section_callback (bfd *abfd, asection *asec, void *data) { struct memory_write_request *new_request; ... new_request->begin = bfd_section_lma (abfd, asec) + args->load_offset; ... void generic_load (char *args, int from_tty) { ... cbdata.load_offset = strtoul (argv[1], &endptr, 0); "unsigned long" is not wide enough in the cases of 32-bit gdb x 64-bit target, or LLP64 (like Windows 64-bit). load_offset should be ULONGEST or CORE_ADDR. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.