This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug rust/21483] Rust expression evaluation can be really expensive
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 12 May 2017 15:05:31 +0000
- Subject: [Bug rust/21483] Rust expression evaluation can be really expensive
- Auto-submitted: auto-generated
- References: <bug-21483-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=21483
--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <tromey@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6830f270e7b6676e7a77c1b8080941e35003d918
commit 6830f270e7b6676e7a77c1b8080941e35003d918
Author: Tom Tromey <tom@tromey.com>
Date: Thu May 11 22:22:36 2017 -0600
Avoid exponential behavior in rust_evaluate_subexp
The STRUCTOP_STRUCT case in rust_evaluate_subexp would evaluate its
LHS, and then, if it did not need Rust-specific treatment, it would
back up and re-evaluate the entire STRUCTOP_STRUCT part of the
expression using evaluate_subexp_standard. This yields exponential
behavior and causes some expressions to evaluate extremely slowly.
The fix is to simply do the needed work inline.
This is PR rust/21483.
ChangeLog
2017-05-12 Tom Tromey <tom@tromey.com>
PR rust/21483:
* rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
recurse, just call value_struct_elt directly.
--
You are receiving this mail because:
You are on the CC list for the bug.