List:Commits« Previous MessageNext Message »
From:Vladislav Vaintroub Date:September 15 2008 8:05pm
Subject:RE: bzr commit into mysql-5.1-bugteam branch (vvaintroub:2678)
Bug#35987
View as plain text  

> -----Original Message-----
> From: Magnus.Svensson@stripped [mailto:Magnus.Svensson@stripped]
> Sent: Monday, September 15, 2008 9:22 PM
> To: Vladislav Vaintroub; magnus 'msvensson' Svensson
> Cc: commits@stripped
> Subject: Re: bzr commit into mysql-5.1-bugteam branch (vvaintroub:2678)
> Bug#35987
> 
> +      char *p= strrchr(module_dir,'\\');
> +      if (!p)
> +      {
> +        /*
> +          Path separator was not found. Not known to happen, if ever
happens,
> +          will indicate current directory.
> +        */
> +        module_dir[0]= '.';
> +        p= module_dir + 1;
> +      } 
> magnus: still feels like this could potentially go wrong. Will look more
> tomorrow. But maybe I'm just overly careful?

My guess is overly careful,  and this is actually good :)

Maybe it helps to know which cases I have tested before claiming there is no
possibility to have relative paths in Module32First/Next and that unix path
separators are translated to Windows.

I  created a dummy DLL in C:\tools. I created a new standalone application
that does LoadLibrary and get_symbol_path after it and looked if the output
looks ok.
I tried 
1) LoadLibrary("mydll.dll") (with PATH previously set to "%PATH%;C:\tools")
2) LoadLibrary ("C:\\tools\\mydll.dll")
3) LoadLibrary("C:/tools/mydll.dll")

In all cases, after load library the Module32Next returned
"C:\tools\mydll.dll" in mod.szExePath.

I repeated 1) with mydll.dll copied in the same directory as the test
program , and also after that  mod.szExePath was an absolute path.


Thread
bzr commit into mysql-5.1-bugteam branch (vvaintroub:2678) Bug#35987Vladislav Vaintroub15 Sep
  • Re: bzr commit into mysql-5.1-bugteam branch (vvaintroub:2678)Bug#35987Magnus Svensson15 Sep
    • RE: bzr commit into mysql-5.1-bugteam branch (vvaintroub:2678)Bug#35987Vladislav Vaintroub15 Sep
      • Re: bzr commit into mysql-5.1-bugteam branch (vvaintroub:2678)Bug#35987Magnus Svensson16 Sep
        • RE: bzr commit into mysql-5.1-bugteam branch (vvaintroub:2678)Bug#35987Vladislav Vaintroub16 Sep
          • Re: bzr commit into mysql-5.1-bugteam branch (vvaintroub:2678)Bug#35987Magnus Svensson16 Sep