apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject error handling in apr_rmm_foo busted
Date Thu, 19 Sep 2002 10:11:49 GMT
Looking at the problem behind PR 12616 exposes some brokenness with
error handling in apr_rmm_*().

Example 1:

  apr_rmm_malloc() can return apr_status_t if a lock operation fails
  or an apr_rmm_off_t otherwise.

  How can the caller know which it is?

Example 2:

  apr_rmm_realloc() checks for a negative return code from
  apr_rmm_malloc().  The return code can't be negative because of the
  data type (not to mention the logic of apr_rmm_malloc()).

Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...

View raw message