Skip to content

Conversation

jiahongxujia
Copy link

No description provided.

Christophe Jaillet and others added 30 commits March 25, 2015 07:09
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1669057 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1669059 13f79535-47bb-0310-9956-ffa450edef68
In apr_global_mutex_timedlock(), we can avoid converting from relative to
absolute time if thread locking is not needed.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1669077 13f79535-47bb-0310-9956-ffa450edef68
PR: 56866
Submitted by: Timothy Gu <timothygu99 gmail.com>
Reviewed by: trawick


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1671296 13f79535-47bb-0310-9956-ffa450edef68
…hasn't

needed it in over a decade, and GNU gcc spews warnings about it.

Misty De Meo provided the best research:

    The last release I can find where -cpp-precomp did anything is 2.95.2 
    (Apple build 937.2), from the December 2002 Xcode, prior to the release
    of Xcode 1.0 (presumably the one that shipped with it): 
    http://opensource.apple.com/source/gcc/gcc-1640/gcc/gcc.c

    In subsequent releases -cpp-precomp and -no-cpp-precomp were both made
    no-ops. The last time they were mentioned was in the install.texi from
    Apple GCC build 1765, from the WWDC 2004 developer tools; it was already
    a no-op by then.

Submitted by: Neil Conway <nrc cs.berkeley.edu>, Misty De Meo <misty brew.sh>
Reviewed by: trawick


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1671329 13f79535-47bb-0310-9956-ffa450edef68
of 26 temporary files.

PR: 57677


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1671356 13f79535-47bb-0310-9956-ffa450edef68
This test was never implemented if !APR_HAS_FORK, but the
capability check was error prone. 


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1671386 13f79535-47bb-0310-9956-ffa450edef68
…opriate.

(APR_SUCCESS was returned instead in that scenario.)


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1671389 13f79535-47bb-0310-9956-ffa450edef68
and the real event if a real event occurs AND apr_pollset_wakeup()
is called before apr_pollset_poll() is called and/or awakened.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1671513 13f79535-47bb-0310-9956-ffa450edef68
real event occurs AND apr_pollset_wakeup() has been called.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1671514 13f79535-47bb-0310-9956-ffa450edef68
The apr_skiplist_last[_compare]() functions return the last matching element
(duplicate) whereas the existing apr_skiplist_find[_compare]() return the first
one encountered during the walk.

The function apr_skiplist_remove_node() function allows to remove an element
given its node, e.g. an iterator from apr_skiplist_{getlist,previous,next}().

The goal is to have a reliable way to find (and remove) any element having a
unique address/pointer, by starting with the last duplicate and then iterating
on the previous ones until the match (see example in testskiplist.c).

apr_skiplist_last() is much more efficient than apr_skiplist_first() would be,


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1671957 13f79535-47bb-0310-9956-ffa450edef68
Fix insert_compare() returning NULL on the very first insertion (top is NULL).

git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1672354 13f79535-47bb-0310-9956-ffa450edef68
The height of a skiplist is always at least one, for the top node,
even if our implementation may delay its creation on the first insert
or delete it on the last remove.
This also helps apr_skiplist_remove() to never return zero (not found)
when it deletes the last node.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1672366 13f79535-47bb-0310-9956-ffa450edef68
Instead, define and use ecomp() which bases uniqueness on both elem's a and b,
and test it with multiple duplicates inserted/found/removed in arbitray order.

Improve comment on when/how these compare functions could be used in real apps.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1672495 13f79535-47bb-0310-9956-ffa450edef68
…cles in

the hot path get_b_rand().

git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1672575 13f79535-47bb-0310-9956-ffa450edef68
* memory/unix/apr_pools.c
  (apr_pool_initialize): Add parent to debug header.
  (apr_pool_log_event): Add parent to debug output.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1674566 13f79535-47bb-0310-9956-ffa450edef68
…me atomic

functions.  PR 55418.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1675668 13f79535-47bb-0310-9956-ffa450edef68
maintaining the ability to build on Visual Studio 6 with 
Windows Server 2003 R2 SDK.

PR: 57191


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1675751 13f79535-47bb-0310-9956-ffa450edef68
always emitted before allocation events and subpool destruction
events are emitted on pool clear/destroy for proper accounting.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1675967 13f79535-47bb-0310-9956-ffa450edef68
don't try to emit any debug events after the debug log file handle
has been closed.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1675970 13f79535-47bb-0310-9956-ffa450edef68
global pool creation event.  This ensures that the allocation
event from the cleanup registration written after the creation event.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1675982 13f79535-47bb-0310-9956-ffa450edef68
APR applications using APR named pipe support on Windows can be 
vulnerable to a pipe squatting attack from a local process; the extent
of the vulnerability, when present, depends on the application.
Initial analysis and report was provided by John Hernandez of Casaba 
Security via HP SSRT Security Alert.

Submitted by: ylavic


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1676013 13f79535-47bb-0310-9956-ffa450edef68
ylavic and others added 18 commits November 5, 2017 00:58
The above commits added the checks for HAVE_GETRANDOM and HAVE_ARC4RANDOM first
in configure.in so to avoid breaking the AC_MESSAGE_CHECKING/RESULT line, thus
it also defined the macros unconditionally (while the others were and still are
only defined if no previous one is elected already).

Yet the top priority one should remain HAVE_EGD when --with-egd is specified,
so we now have to rearrange apr_generate_random_bytes()'s #ifdefs to preserve
that now.

While at it, let's add an #error for the "should not happen" case where
APR_HAS_RANDOM is defined but no implementation is found.



git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1814331 13f79535-47bb-0310-9956-ffa450edef68
* network_io/unix/sockaddr.c (apr_sockaddr_zone_set,
  apr_sockaddr_zone_get): New functions.
  (apr_sockaddr_ip_getbuf): Append %scope for link-local address.
  (apr_sockaddr_equal): Compare link-local address with different
  scopes as not equal.

* include/apr_network_io.h: Add function declarations.

* configure.in: Test for if_indextoname and if_nametoindex.

* test/testsock.c (test_zone): New test case.

* include/arch/win32/apr_private.h: Assume Windows supports
  if_nametoindex and if_indextoname.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1816527 13f79535-47bb-0310-9956-ffa450edef68
  for an address which is not link-local.

* include/apr_network_io.h: Document the above.

* test/testsock.c (test_zone): Test for that.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1816628 13f79535-47bb-0310-9956-ffa450edef68
* memory/unix/apr_pools.c (apr_pool_get_tag): New function.

* test/testpools.c: Test it.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1817892 13f79535-47bb-0310-9956-ffa450edef68
…turning

from poll(), e.g. APR_POLLSET_PORT should re-arm it automatically.



git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1819857 13f79535-47bb-0310-9956-ffa450edef68
Just like user fds (file, socket), otherwise it's one shot only (PR-61786).

Corresponding test committed in r1819857.



git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1819858 13f79535-47bb-0310-9956-ffa450edef68
…king the

pollset and handling the dead ring, all is simple/fast/nonblocking ops.

Also, set types of "i" and "j" respectively to the ones of nget and *num.



git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1819860 13f79535-47bb-0310-9956-ffa450edef68
This test is redundant now, axe it (no functional change).



git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1819861 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1820080 13f79535-47bb-0310-9956-ffa450edef68
r1814239 added:
  AC_CHECK_FUNCS(arc4random_buf)

Which only defines HAVE_ARC4RANDOM_BUF





git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1820755 13f79535-47bb-0310-9956-ffa450edef68
… as it points to memory we just freed.

git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1822315 13f79535-47bb-0310-9956-ffa450edef68
Avoids "conversion from 'size_t' to 'apr_uint32_t', possible loss" warnings.



git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1822357 13f79535-47bb-0310-9956-ffa450edef68
Support customize libtool by variable assigning, it is helpful
for cross compileing (such as libtool=aarch64-linux-libtool)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
While cross compiling, the tools/gen_test_char could not
be executed at build time, use AX_PROG_CC_FOR_BUILD to
build native tools/gen_test_char

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
@wrowe
Copy link
Member

wrowe commented Aug 30, 2018

Thank you for your submission, applied in svn r1839627/r1839628 to trunk and 1.7.
Passing this on to dev@apr.apache.org for discussion of applying to 1.6 branch.

@wrowe
Copy link
Member

wrowe commented Aug 30, 2018

Note discussion on dev@apr.apache.org. Because this introduces a new dependency for maintainers
using buildconf to obtain autoconf-archive, the group may choose to reject the proposal and revert.
To be determined.

@wrowe
Copy link
Member

wrowe commented Aug 30, 2018

My results;

make[1]: Entering directory '/home/wrowe/dev/build/apr2-ossl110'
/home/wrowe/dev/apr-2.0/build/mkdir.sh tools
../../apr-2.0/tools/gen_test_char.c -o tools/gen_test_char
make[1]: execvp: ../../apr-2.0/tools/gen_test_char.c: Permission denied

This is from a vpath build.

The resulting Makefile is;
tools/gen_test_char: tools/gen_test_char.c
$(APR_MKDIR) tools
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $&lt; -o $@

include/private/apr_escape_test_char.h: tools/gen_test_char
$(APR_MKDIR) include/private
tools/gen_test_char > $@

So... $(CC_FOR_BUILD) appears to be garbage/empty, cannot find it after recursively searching the buildpath tree following buildconf+configure.

@minfrin
Copy link
Contributor

minfrin commented Dec 26, 2019

AX_PROG_CC_FOR_BUILD was missing from the path, added in r1871998.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.