apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwool...@apache.org
Subject cvs commit: apr/include apr_pools.h
Date Sat, 25 May 2002 20:17:45 GMT
jwoolley    02/05/25 13:17:45

  Modified:    include  apr_pools.h
  Log:
  Fair warning, as this keeps coming up over and over.  We're not using
  apr_pool_userdata_setn() anymore as far as I can tell, because anywhere
  that we used it was later deemed unsafe for one reason or another.  Is
  it wise to have it in the API at all?  I suppose it has value, but
  knowing when it's safe to use it can be tricky.
  
  Revision  Changes    Path
  1.93      +8 -2      apr/include/apr_pools.h
  
  Index: apr_pools.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_pools.h,v
  retrieving revision 1.92
  retrieving revision 1.93
  diff -u -d -u -r1.92 -r1.93
  --- apr_pools.h	10 May 2002 14:03:29 -0000	1.92
  +++ apr_pools.h	25 May 2002 20:17:45 -0000	1.93
  @@ -488,8 +488,14 @@
    * @note same as apr_pool_userdata_set(), except that this version doesn't
    *       make a copy of the key (this function is useful, for example, when
    *       the key is a string literal)
  - * @warning The key and the data to be attached to the pool should have
  - *       a life span at least as long as the pool itself.
  + * @warning This should NOT be used if the key could change addresses by
  + *       any means between the apr_pool_userdata_setn() call and a
  + *       subsequent apr_pool_userdata_get() on that key, such as if a
  + *       static string is used as a userdata key in a DSO and the DSO could
  + *       be unloaded and reloaded between the _setn() and the _get().  You
  + *       MUST use apr_pool_userdata_set() in such cases.
  + * @warning More generally, the key and the data to be attached to the
  + *       pool should have a life span at least as long as the pool itself.
    *
    */
   APR_DECLARE(apr_status_t) apr_pool_userdata_setn(
  
  
  

Mime
View raw message