This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Don't recursively look for a symbol in all imports of imported modules.


*** TEST RESULTS FOR COMMIT 38899f16e1560ce3020bab8a6a0b3a0c017d7925 ***

Author: Iain Buclaw <ibuclaw@gdcproject.org>
Branch: master
Commit: 38899f16e1560ce3020bab8a6a0b3a0c017d7925

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]