[Issue 8936] Throwing results in searching the whole directory tree rooted in current directory

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Nov 22 02:54:34 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8936


David Held <dmd at wyntrmute.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dmd at wyntrmute.com


--- Comment #8 from David Held <dmd at wyntrmute.com> 2012-11-22 02:54:27 PST ---
The root cause is that druntime/core/sys/windows/stacktrace.d::static this()
calls WinAPI's SymInitialize() with a NULL user path.  This results in the
default path:

  %CWD%;%_NT_SYMBOL_PATH%;%_NT_ALTERNATE_SYMBOL_PATH%

as per the MSDN documentation here:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms681351%28v=vs.85%29.aspx.
 Unfortunately, I cannot repro this behavior on Windows 7 Home Premium SP1,
dbghelp.dll 6.1.  I suspect that newer versions of dbghelp.dll are simply more
clever than what MSDN states (for instance, if the semantics were changed to
make the default path start with the image location, 99% of all directory
scanning would be eliminated; also, it is pretty silly to not have this as the
default behavior).

Please report which version of dbghelp.dll you are using.  There are likely
multiple versions present on your machine, so you can discover the one being
used via 'where':

  where dbghelp.dll

It will most likely discover the version in %SystemRoot%\system32.  You can
find the version in the file properties.

Assuming that this is truly only a problem with older versions of dbghelp.dll
(e.g.: 5.x versions), it is not difficult to simply provide a custom user path
starting with the current executable image path.  However, I do not have a
means to verify the fix, as I cannot repro the actual problem.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list