This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Avoid exponential behavior in rust_evaluate_subexp
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Fri, 12 May 2017 12:47:11 -0400
- Subject: [binutils-gdb] Avoid exponential behavior in rust_evaluate_subexp
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 6830f270e7b6676e7a77c1b8080941e35003d918 ***
Author: Tom Tromey <tom@tromey.com>
Branch: master
Commit: 6830f270e7b6676e7a77c1b8080941e35003d918
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.