apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <...@apache.org>
Subject Re: cvs commit: apr/test testdso.c
Date Sun, 29 Dec 2002 06:21:13 GMT


On 29 Dec 2002 wrowe@apache.org wrote:

> wrowe       2002/12/28 21:44:02
>
>   Modified:    test     testdso.c
>   Log:
>     First; once any apr object is closed, the results are undefined.

<snipped part of the commit message>

>   Index: testdso.c
>   ===================================================================
>   RCS file: /home/cvs/apr/test/testdso.c,v
>   retrieving revision 1.30
>   retrieving revision 1.31
>   diff -u -r1.30 -r1.31
>   --- testdso.c	19 Dec 2002 16:15:29 -0000	1.30
>   +++ testdso.c	29 Dec 2002 05:44:01 -0000	1.31
>   @@ -66,7 +66,7 @@
>
>    #ifdef NETWARE
>    # define LIB_NAME "mod_test.nlm"
>   -#elif defined(BEOS)
>   +#elif defined(BEOS) || defined(WIN32)
>    # define LIB_NAME "mod_test.so"
>    #elif defined(DARWIN)
>    # define LIB_NAME ".libs/mod_test.so"
>   @@ -155,17 +155,11 @@
>
>        status = apr_dso_unload(h);
>        CuAssert(tc, apr_dso_error(h, errstr, 256), APR_SUCCESS == status);
>   -
>   -    status = apr_dso_sym(&func1, h, "print_hello");
>   -    CuAssertIntEquals(tc, APR_EINIT, status);
>    }

I seriously disagree with this change.  If the dso is unloaded, you
shouldn't be able to find a symbol in it anymore.  One of the points of
APR is that it removes this kind of platform difference.  Right now,
somebody can program on Windows, and use the wrong pool to load a library.
Then, after the pool is cleared still be able to dso_sym that library.
However, if that program is then brought to another platform, it will no
longer work.

I am currently -0.9 for this change.  Is there a reason we can't solve
this problem so that incorrect pool scope can be easily found on all
platforms?

Ryan


Mime
View raw message