From 38899f16e1560ce3020bab8a6a0b3a0c017d7925 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Sun, 28 Feb 2016 10:25:55 +0100 Subject: Don't recursively look for a symbol in all imports of imported modules. Given two or more modules that import each other's scope, the current symbol lookup routines would go round in circles looking through each import from each module, possibly checking the same module twice or more until all possible paths are marked as "searched". Given enough modules, this causes an exponential slowdown in time taken to find symbols that do exist, and infinite recursion when they don't. gdb/ChangeLog: * d-namespace.c (d_lookup_symbol_imports): Avoid recursive lookups from cyclic imports. gdb/testsuite/ChangeLog: * gdb.dlang/circular.c: New file. * gdb.dlang/circular.exp: New file. --- gdb/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gdb/ChangeLog') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bcbaacfe224..bc6a713d01a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2016-02-28 Iain Buclaw + + * d-namespace.c (d_lookup_symbol_imports): Avoid recursive lookups from + cyclic imports. + 2016-02-26 Keith Seitz * rs6000-tdep.c (rs6000_frame_cache): Explicitly cast return result -- cgit v1.2.1