[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: apr-iconv

From: Branko Čibej <brane_at_xbc.nu>
Date: 2003-02-25 21:18:06 CET

SteveKing wrote:

> Hi,
>
> with the last version (0.18) Subversion delivers
> many apr-iconv *.so modules with the windows
> version. Those are compiled with VC6 and depend
> on MSVCRT.dll. Also the Subversion installer
> set the environement variable APR_ICONV_PATH
> to the location where those *.so files are copied to.
> This will work as long as there is NO other
> Subversion client installed or if those clients
> are also built with VC6.
> As soon as another client built with VS.NET
> does the same (copies its *.so files and sets
> the environement variable) then the original
> Subversion client will probably crash 'cause
> *.so files compiled with VS.NET depend
> on MSVCR70.dll - and MSVCRT.dll and MSVCR70.dll
> in the same process space lead to severe heap
> corruption (see posts about the berkeley db
> libs built with VC6 and VS.NET).

I'd say complain to Microsoft. If shared libs compiled with one version
of the compiler are useless for programs that are compiled with the
other, that's MS's problem, not ours. Well, theoretically, anyway...

> If the client built with VS.NET does not copy
> those *.so files and set the env-variable then
> that client will crash (already happened with
> mine, and such heap corruption bugs are really
> hard to track down!).
>
> I thought about setting that env-variable on
> client start and resetting it on exit, but this
> won't work if those clients are used the same
> time, or if the client crashes (hey, no programmer
> is perfect) before resetting the variable.

You can set that env. variable only within the process, without touching
the environment of other programs. That's what SetEnvironmentVariable
(or apr_env_set) does.

> I'm not sure but I think apr-iconv looks in
> the folder ./iconv (below the application folder)
> if that env-variable is not set, at least there's
> a #define in the source for that.
> Would that be a solution to this problem?

Not really, because you'd have to make sure that the working directory
is the one where your program is installed. Alternatively, you could
teach apr-iconv on Windows to use the dirname of the module filename as
an alternative search path for the conversion modules, if APR_ICONV_PATH
isn't defined.

> Just not set the env-variable and force
> the installer to copy those files to the
> subfolder "iconv"?
>
> Suggestions?

I would definitely like to see a solution that leta _all_ Subversion
clients share the same apr-iconv conversion modules, preferably the ones
installed with Apache (if you happen to have Apache installed). If that
means downgrading to MSVC6 for all released binaries, then so be it.

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Feb 25 21:18:51 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.