Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for C++ Builder/Ninja build system #13

Open
wants to merge 6,998 commits into
base: 1.6.x
Choose a base branch
from

Conversation

alex-bassi-telit-com
Copy link

@alex-bassi-telit-com alex-bassi-telit-com commented Aug 22, 2018

Work in progress
I've added the project files to build the library (static and dynamic) using C++ Builder (Embarcadero). The library can be successfully compiled using the free Community Edition.

Few small modifications to the source were necessary to support C++ Builder (32 bit Clang compiler only).
The static library can be also compiled using Ninja build system through CMake by addressing bcc32x.exe compiler (see notes in README and README.cmake).

Some compile errors still needs to be fixed in order to also compile the tests (mainly due to missing compiler or linker flags).

Guenter Knauf and others added 30 commits July 24, 2014 10:19
Follow up to r1604596: include skiplist test in the cmake-based build


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1625182 13f79535-47bb-0310-9956-ffa450edef68
Install apr_perms_set.h


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1625186 13f79535-47bb-0310-9956-ffa450edef68
cmake >= 2.8.12 doesn't generate .pdb files for static libs,
and points out that they aren't useful anyway:

  http://public.kitware.com/Bug/view.php?id=14600

remove .pdb handling for static libs regardless of cmake version


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1625188 13f79535-47bb-0310-9956-ffa450edef68
  *) On z/OS, apr_sockaddr_info_get() with family == APR_UNSPEC was not
     returning IPv4 addresses if any IPv6 addresses were returned.



git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1634618 13f79535-47bb-0310-9956-ffa450edef68
apr_pollset state fixes for z/OS

Submitted By: Pat Odonnell <patod us ibm com>
Committed By: covener




git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1646895 13f79535-47bb-0310-9956-ffa450edef68
Backport of r1648830 from trunk.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1648831 13f79535-47bb-0310-9956-ffa450edef68
Reported by 河本和彦 kohmoto iris eonet ne jp.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1664072 13f79535-47bb-0310-9956-ffa450edef68
Also, dups are added *after* each other, not before (for stability).


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1664408 13f79535-47bb-0310-9956-ffa450edef68
…1110,

                    r1611117,r1611120,r1611125,r1611184,r1611193,r1611466,
                    r1611515,r1611517,r1664406,r1664447,r1664451,r1664471
                    from trunk


r1597797 | jim | 2014-05-27 16:20:29 +0200 (Tue, 27 May 2014) | 2 lines

apr_skiplist_add()... idea from yann


r1597803 | jim | 2014-05-27 17:14:44 +0200 (Tue, 27 May 2014) | 2 lines

update docco


r1605104 | jim | 2014-06-24 17:05:26 +0200 (Tue, 24 Jun 2014) | 2 lines

missing proto


r1611023 | ylavic | 2014-07-16 16:32:05 +0200 (Wed, 16 Jul 2014) | 5 lines

Three fixes:
- double size increment in insert_compare(),
- multiple apr_skiplist_free() called on the same value in remove_compare(),
- return 0 instead of NULL for void*.


r1611107 | ylavic | 2014-07-16 19:38:03 +0200 (Wed, 16 Jul 2014) | 6 lines

We do not garantee zero-ed memory for apr_skiplist_alloc(), neither in
the description, nor in the code for reused chunks.

So always allocate raw memory and don't rely on zero-ed one after internal
calls to apr_skiplist_alloc().


r1611110 | ylavic | 2014-07-16 19:42:22 +0200 (Wed, 16 Jul 2014) | 1 line

Improve skiplist tests.

r1611117 | ylavic | 2014-07-16 19:59:50 +0200 (Wed, 16 Jul 2014) | 3 lines

Use apr_skiplist_add() instead of apr_skiplist_insert() to merge skiplists
since doublons need to be merged too.


r1611120 | ylavic | 2014-07-16 20:10:33 +0200 (Wed, 16 Jul 2014) | 3 lines

Call free() on the skiplist structure in apr_skiplist_destroy() if it was
apr_skiplist_init()ialized without a pool (ie. malloc()ed).


r1611125 | ylavic | 2014-07-16 20:21:33 +0200 (Wed, 16 Jul 2014) | 3 lines

Let apr_skiplist_find_compare() handle given NULL iterator, and be safe
from NULL returns.


r1611184 | ylavic | 2014-07-16 22:53:11 +0200 (Wed, 16 Jul 2014) | 4 lines

Reuse the skiplist's stack needed by insert_compare() by growing it with adds.
Rename the "replace" argument as "add" (negating the boolean) to avoid confusion
since the skiplist never replaces any element (add or preserve semantic).


r1611193 | ylavic | 2014-07-16 23:16:06 +0200 (Wed, 16 Jul 2014) | 4 lines

Don't grow the skiplist's height if the element is finally not inserted (preserve semantic).
Do this by moving the top node creation after insertion occured, and linking to the just
inserted node(s).


r1611466 | ylavic | 2014-07-17 22:26:30 +0200 (Thu, 17 Jul 2014) | 5 lines

Follow up to r1611193: update the inserted node's top while looping should we
have to create more than one top node (eg. preheight > 0).

(the check on p != NULL can be omited since it can't be here).


r1611515 | ylavic | 2014-07-18 01:58:02 +0200 (Fri, 18 Jul 2014) | 3 lines

Provide apr_skiplist_size/height/preheight() to get the corresponding values
in O(1), and apr_skiplist_set_preheight() to configure preheight mode.


r1611517 | ylavic | 2014-07-18 02:25:24 +0200 (Fri, 18 Jul 2014) | 2 lines

Follow up to r1611515: remove useless <limits.h> inclusion (for unused INT_MAX).


r1664406 | jim | 2015-03-05 17:51:39 +0100 (Thu, 05 Mar 2015) | 3 lines

FIX: Skiplists should allow for dups by default. Also, when added, dups
are added *after* each other, not before


r1664447 | ylavic | 2015-03-05 19:31:45 +0100 (Thu, 05 Mar 2015) | 1 line

skiplist: Follow up to r1664406: use insert() in apr_skiplist_merge and optimize test in insert_compare().


r1664451 | ylavic | 2015-03-05 19:42:35 +0100 (Thu, 05 Mar 2015) | 1 line

skiplist: Follow up to r1664406+r1664447: Better optimize test in insert_compare() and keep find_compare() in sync.


r1664471 | ylavic | 2015-03-05 21:00:25 +0100 (Thu, 05 Mar 2015) | 1 line

skiplist: improve duplicates ordering test.



git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1664475 13f79535-47bb-0310-9956-ffa450edef68
Provide apr_skiplist_element().


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1664771 13f79535-47bb-0310-9956-ffa450edef68
More optimizations.

We don't need to create the top before inserting, this will be done
if/once the value is really added (since r1611193).

Check compare value only if m->next is not NULL, otherwise we already
known it is to be handled as negative (down).


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1664772 13f79535-47bb-0310-9956-ffa450edef68
Generalize the internal stack structure as a queue (FIFO), and use it for the
spare nodes (instead of apr_skiplist_alloc()/free()) and the insertion stack.

Fix a memory leak in destroy() when memory is malloc()ed (pool is NULL).


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1664776 13f79535-47bb-0310-9956-ffa450edef68
fix test

Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1664906 13f79535-47bb-0310-9956-ffa450edef68
Maintain stability ordering

Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1664912 13f79535-47bb-0310-9956-ffa450edef68
When removing the last node, we have top = bottom = NULL,
and must set topend = bottomend = NULL too.

Also fix test from r1664471 according to r1664911.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1664960 13f79535-47bb-0310-9956-ffa450edef68
skiplist: restore back add-if-not-exist semantic to apr_skiplist_insert(),
and hence add-next-to-any-existing semantic to apr_skiplist_add(), getting rid
of apr_skiplist_addne().


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1666413 13f79535-47bb-0310-9956-ffa450edef68
skiplist: check NULL compare function in apr_skiplist_find_compare() instead
of apr_skiplist_find() so that both functions act the same way in this case,
like insert[_compare]() and remove[_compare]().

Rearrange apr_skiplist_find() after apr_skiplist_find_compare() (still like
others, the former calling the latter), and also move apr_skiplist_getlist()
near to apr_skiplist_{next,previous}().


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1666459 13f79535-47bb-0310-9956-ffa450edef68
skiplist: sync tests with 1.5.x.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1666603 13f79535-47bb-0310-9956-ffa450edef68
We want to test the real apr_skiplist_add() in 1.6.x.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1666606 13f79535-47bb-0310-9956-ffa450edef68
testskiplist: Add a test to show that comparek == compare is required for
apr_skiplist_remove() and apr_skiplist_find() to work.

It also shows that a single compare function can be used for add semantic
with apr_skiplist_insert() (and unique pointers).


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1666612 13f79535-47bb-0310-9956-ffa450edef68
Backport of r1666811 fro trunk.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1666812 13f79535-47bb-0310-9956-ffa450edef68
apr_thread_cond_*wait() on BeOS: Fix broken logic.

PR: 45800
Submitted by: Jochen Voss (no e-mail)
Reviewed by: trawick
Backported by: ylavic


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1667883 13f79535-47bb-0310-9956-ffa450edef68
apr_poll(cb): fix error paths returned values and leaks.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1667919 13f79535-47bb-0310-9956-ffa450edef68
Christophe Jaillet and others added 23 commits August 25, 2018 21:08
Fix missing 'args' declaration

Backport of r1839113 in trunk resp. r1939116 from 1.7.x

git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1839117 13f79535-47bb-0310-9956-ffa450edef68
Add some links to function

Backport of r1839182 from trunk resp. r1839183 from 1.7.x

git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1839184 13f79535-47bb-0310-9956-ffa450edef68
…that escape characters, otherwise they look as no-op :)

Backport of 1839186 from trunk resp. 1839187 from 1.7.x

git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1839188 13f79535-47bb-0310-9956-ffa450edef68
Pull request apache#6
docs/APRDesign.html
docs/canonical_filenames.html
docs/incomplete_types
Submitted by: "Bruno P. Kinoshita" <brunodepaulak yahoo.com.br>

Pull request apache#10
misc/unix/errorcodes.c 
Submitted by: Jimmy Casey <casey.jimmy gmail.com>

Backports: r1839622


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1839624 13f79535-47bb-0310-9956-ffa450edef68
…d in one

single case of user-provided input, to avoid an index into invalid memory.

Backports: 1839769



git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1839771 13f79535-47bb-0310-9956-ffa450edef68
Backport the *bugfix* part of r1808457 and further bugfix r1829962,
to only manipulate the mutex when opened for XTHREAD. This follows
the mutex logic obvious in file_io/win32/readwrite.c

This patch ignores the optimizations introduced by r1808457.

Submitted by: kotkov, mturk



git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1840144 13f79535-47bb-0310-9956-ffa450edef68
Submitted by: rjung
Backports: r1840372


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1840374 13f79535-47bb-0310-9956-ffa450edef68
  explain and credit breaking regression fix for posterity.



git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1840467 13f79535-47bb-0310-9956-ffa450edef68
* build/gen-build.py (extract_deps): Do not assume that source files are only ASCII.
   This fixes a build failure on macOS High Sierra.

(Note 1.6 is still in maintainence, 1.7 not yet released.)

Backports: r1846806
Submitted by: brane


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1847147 13f79535-47bb-0310-9956-ffa450edef68
Backport of r1850087 from trunk resp. r1850089
from 1.7.x.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1850090 13f79535-47bb-0310-9956-ffa450edef68
https://git.savannah.gnu.org/cgit/config.git.

Backport of r1850095 from trunk resp. r1850096
from 1.7.x.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1850097 13f79535-47bb-0310-9956-ffa450edef68
@michael-o
Copy link
Member

Though, I am not a committer. I'd reject this. Why do you add binaries to the PR? Can't the project file be generated? If you see compiler errors wtih cl, create tickets and a PR for. Don't mix concerns please.

@alex-bassi-telit-com
Copy link
Author

Though, I am not a committer. I'd reject this. Why do you add binaries to the PR? Can't the project file be generated? If you see compiler errors wtih cl, create tickets and a PR for. Don't mix concerns please.

Sorry, my mistake: I pushed to the wrong repo..thanks for your help.

asfgit pushed a commit that referenced this pull request Dec 16, 2020
apr_pools: lock parent pool in pool_destroy_debug().

By using apr_pool_clear_debug() instead of pool_clear_debug() in
pool_destroy_debug() we gain the locking provided by the former and thus
protection from concurrent access from apr_pool_walk_tree(), which is
undefined behaviour.

While pool_destroy_debug()=>apr_pool_clear_debug()=>pool_clear_debug() calls
pool_destroy_debug() for all the children pools, this does not cause a deadlock
because apr_pool_clear_debug() locks the parent pool only (not the pool itself)
and thus pool_destroy_debug(pool->child) locks the current pool with no issue.

This fixes use-after-free like the below in httpd (with -D APR_POOL_DEBUG):

=================================================================
==2026856==ERROR: AddressSanitizer: heap-use-after-free on address 0x60600025acf0 at pc 0x7fe738f4c5be bp 0x7fe718598110 sp 0x7fe718598108
READ of size 8 at 0x60600025acf0 thread T51
    #0 0x7fe738f4c5bd in apr_thread_mutex_lock locks/unix/thread_mutex.c:124
    #1 0x7fe738f4e01c in apr_pool_walk_tree memory/unix/apr_pools.c:1505
    #2 0x7fe738f4e066 in apr_pool_walk_tree memory/unix/apr_pools.c:1511
    #3 0x7fe738f4e066 in apr_pool_walk_tree memory/unix/apr_pools.c:1511
    #4 0x7fe738f4e066 in apr_pool_walk_tree memory/unix/apr_pools.c:1511
    #5 0x7fe738f5027c in apr_pool_find memory/unix/apr_pools.c:2291
    #6 0x7fe738f14aba in apr_table_mergen tables/apr_tables.c:746
    #7 0x5578ad926a25 in ap_set_keepalive /home/ylavic/src/apache/httpd/trunk/modules/http/http_protocol.c:309
    #8 0x5578ad93933f in ap_http_header_filter /home/ylavic/src/apache/httpd/trunk/modules/http/http_filters.c:1376
    #9 0x5578ad98f7bd in ap_pass_brigade /home/ylavic/src/apache/httpd/trunk/server/util_filter.c:783
    #10 0x5578ad9a67f3 in ap_content_length_filter /home/ylavic/src/apache/httpd/trunk/server/protocol.c:2046
    #11 0x5578ad98f7bd in ap_pass_brigade /home/ylavic/src/apache/httpd/trunk/server/util_filter.c:783
    #12 0x5578ad9405ae in ap_byterange_filter /home/ylavic/src/apache/httpd/trunk/modules/http/byterange_filter.c:463
    #13 0x5578ad98f7bd in ap_pass_brigade /home/ylavic/src/apache/httpd/trunk/server/util_filter.c:783
    #14 0x7fe7330e398b in ap_headers_output_filter /home/ylavic/src/apache/httpd/trunk/modules/metadata/mod_headers.c:891
    #15 0x5578ad98f7bd in ap_pass_brigade /home/ylavic/src/apache/httpd/trunk/server/util_filter.c:783
    #16 0x7fe732e32dba in session_output_filter /home/ylavic/src/apache/httpd/trunk/modules/session/mod_session.c:501
    #17 0x5578ad98f7bd in ap_pass_brigade /home/ylavic/src/apache/httpd/trunk/server/util_filter.c:783
    #18 0x5578ad9c8ee5 in default_handler /home/ylavic/src/apache/httpd/trunk/server/core.c:5188
    #19 0x5578ad9431bb in ap_run_handler /home/ylavic/src/apache/httpd/trunk/server/config.c:170
    #20 0x5578ad944941 in ap_invoke_handler /home/ylavic/src/apache/httpd/trunk/server/config.c:444
    #21 0x5578ad92cc23 in ap_process_async_request /home/ylavic/src/apache/httpd/trunk/modules/http/http_request.c:463
    #22 0x5578ad924d7c in ap_process_http_async_connection /home/ylavic/src/apache/httpd/trunk/modules/http/http_core.c:158
    #23 0x5578ad925410 in ap_process_http_connection /home/ylavic/src/apache/httpd/trunk/modules/http/http_core.c:252
    #24 0x5578ad97e04d in ap_run_process_connection /home/ylavic/src/apache/httpd/trunk/server/connection.c:42
    #25 0x7fe735c7ef79 in process_socket /home/ylavic/src/apache/httpd/trunk/server/mpm/event/event.c:1097
    #26 0x7fe735c856a0 in worker_thread /home/ylavic/src/apache/httpd/trunk/server/mpm/event/event.c:2386
    #27 0x7fe738f7cef4 in dummy_worker threadproc/unix/thread.c:145
    #28 0x7fe738e3eea6 in start_thread nptl/pthread_create.c:477
    #29 0x7fe738d6ed4e in __clone (/lib/x86_64-linux-gnu/libc.so.6+0xfdd4e)

0x60600025acf0 is located 48 bytes inside of 64-byte region [0x60600025acc0,0x60600025ad00)
freed by thread T63 here:
    #0 0x7fe7391ed277 in __interceptor_free (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x107277)
    #1 0x7fe738f4e9e5 in pool_clear_debug memory/unix/apr_pools.c:1893
    #2 0x7fe738f4ecb2 in pool_destroy_debug memory/unix/apr_pools.c:1956
    #3 0x7fe738f4eeeb in apr_pool_destroy_debug memory/unix/apr_pools.c:2002
    #4 0x5578ada2534b in ap_queue_info_push_pool /home/ylavic/src/apache/httpd/trunk/server/mpm_fdqueue.c:230
    #5 0x7fe735c81412 in process_lingering_close /home/ylavic/src/apache/httpd/trunk/server/mpm/event/event.c:1686
    #6 0x7fe735c7f9bc in process_socket /home/ylavic/src/apache/httpd/trunk/server/mpm/event/event.c:1255
    #7 0x7fe735c856a0 in worker_thread /home/ylavic/src/apache/httpd/trunk/server/mpm/event/event.c:2386
    #8 0x7fe738f7cef4 in dummy_worker threadproc/unix/thread.c:145
    #9 0x7fe738e3eea6 in start_thread nptl/pthread_create.c:477


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1883751 13f79535-47bb-0310-9956-ffa450edef68
asfgit pushed a commit that referenced this pull request Dec 16, 2020
By using apr_pool_clear_debug() instead of pool_clear_debug() in
pool_destroy_debug() we gain the locking provided by the former and thus
protection from concurrent access from apr_pool_walk_tree(), which is
undefined behaviour.

While pool_destroy_debug()=>apr_pool_clear_debug()=>pool_clear_debug() calls
pool_destroy_debug() for all the children pools, this does not cause a deadlock
because apr_pool_clear_debug() locks the parent pool only (not the pool itself)
and thus pool_destroy_debug(pool->child) locks the current pool with no issue.

This fixes use-after-free like the below in httpd (with -D APR_POOL_DEBUG):

=================================================================
==2026856==ERROR: AddressSanitizer: heap-use-after-free on address 0x60600025acf0 at pc 0x7fe738f4c5be bp 0x7fe718598110 sp 0x7fe718598108
READ of size 8 at 0x60600025acf0 thread T51
    #0 0x7fe738f4c5bd in apr_thread_mutex_lock locks/unix/thread_mutex.c:124
    #1 0x7fe738f4e01c in apr_pool_walk_tree memory/unix/apr_pools.c:1505
    #2 0x7fe738f4e066 in apr_pool_walk_tree memory/unix/apr_pools.c:1511
    #3 0x7fe738f4e066 in apr_pool_walk_tree memory/unix/apr_pools.c:1511
    #4 0x7fe738f4e066 in apr_pool_walk_tree memory/unix/apr_pools.c:1511
    #5 0x7fe738f5027c in apr_pool_find memory/unix/apr_pools.c:2291
    #6 0x7fe738f14aba in apr_table_mergen tables/apr_tables.c:746
    #7 0x5578ad926a25 in ap_set_keepalive /home/ylavic/src/apache/httpd/trunk/modules/http/http_protocol.c:309
    #8 0x5578ad93933f in ap_http_header_filter /home/ylavic/src/apache/httpd/trunk/modules/http/http_filters.c:1376
    #9 0x5578ad98f7bd in ap_pass_brigade /home/ylavic/src/apache/httpd/trunk/server/util_filter.c:783
    #10 0x5578ad9a67f3 in ap_content_length_filter /home/ylavic/src/apache/httpd/trunk/server/protocol.c:2046
    #11 0x5578ad98f7bd in ap_pass_brigade /home/ylavic/src/apache/httpd/trunk/server/util_filter.c:783
    #12 0x5578ad9405ae in ap_byterange_filter /home/ylavic/src/apache/httpd/trunk/modules/http/byterange_filter.c:463
    #13 0x5578ad98f7bd in ap_pass_brigade /home/ylavic/src/apache/httpd/trunk/server/util_filter.c:783
    #14 0x7fe7330e398b in ap_headers_output_filter /home/ylavic/src/apache/httpd/trunk/modules/metadata/mod_headers.c:891
    #15 0x5578ad98f7bd in ap_pass_brigade /home/ylavic/src/apache/httpd/trunk/server/util_filter.c:783
    #16 0x7fe732e32dba in session_output_filter /home/ylavic/src/apache/httpd/trunk/modules/session/mod_session.c:501
    #17 0x5578ad98f7bd in ap_pass_brigade /home/ylavic/src/apache/httpd/trunk/server/util_filter.c:783
    #18 0x5578ad9c8ee5 in default_handler /home/ylavic/src/apache/httpd/trunk/server/core.c:5188
    #19 0x5578ad9431bb in ap_run_handler /home/ylavic/src/apache/httpd/trunk/server/config.c:170
    #20 0x5578ad944941 in ap_invoke_handler /home/ylavic/src/apache/httpd/trunk/server/config.c:444
    #21 0x5578ad92cc23 in ap_process_async_request /home/ylavic/src/apache/httpd/trunk/modules/http/http_request.c:463
    #22 0x5578ad924d7c in ap_process_http_async_connection /home/ylavic/src/apache/httpd/trunk/modules/http/http_core.c:158
    #23 0x5578ad925410 in ap_process_http_connection /home/ylavic/src/apache/httpd/trunk/modules/http/http_core.c:252
    #24 0x5578ad97e04d in ap_run_process_connection /home/ylavic/src/apache/httpd/trunk/server/connection.c:42
    #25 0x7fe735c7ef79 in process_socket /home/ylavic/src/apache/httpd/trunk/server/mpm/event/event.c:1097
    #26 0x7fe735c856a0 in worker_thread /home/ylavic/src/apache/httpd/trunk/server/mpm/event/event.c:2386
    #27 0x7fe738f7cef4 in dummy_worker threadproc/unix/thread.c:145
    #28 0x7fe738e3eea6 in start_thread nptl/pthread_create.c:477
    #29 0x7fe738d6ed4e in __clone (/lib/x86_64-linux-gnu/libc.so.6+0xfdd4e)

0x60600025acf0 is located 48 bytes inside of 64-byte region [0x60600025acc0,0x60600025ad00)
freed by thread T63 here:
    #0 0x7fe7391ed277 in __interceptor_free (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x107277)
    #1 0x7fe738f4e9e5 in pool_clear_debug memory/unix/apr_pools.c:1893
    #2 0x7fe738f4ecb2 in pool_destroy_debug memory/unix/apr_pools.c:1956
    #3 0x7fe738f4eeeb in apr_pool_destroy_debug memory/unix/apr_pools.c:2002
    #4 0x5578ada2534b in ap_queue_info_push_pool /home/ylavic/src/apache/httpd/trunk/server/mpm_fdqueue.c:230
    #5 0x7fe735c81412 in process_lingering_close /home/ylavic/src/apache/httpd/trunk/server/mpm/event/event.c:1686
    #6 0x7fe735c7f9bc in process_socket /home/ylavic/src/apache/httpd/trunk/server/mpm/event/event.c:1255
    #7 0x7fe735c856a0 in worker_thread /home/ylavic/src/apache/httpd/trunk/server/mpm/event/event.c:2386
    #8 0x7fe738f7cef4 in dummy_worker threadproc/unix/thread.c:145
    #9 0x7fe738e3eea6 in start_thread nptl/pthread_create.c:477


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1883750 13f79535-47bb-0310-9956-ffa450edef68
@jimying
Copy link

jimying commented May 25, 2023

hi, I think it's better use cmake which can specify a build system generator.

# To generate ninja build
cmake -G Ninja 

Now cmake is already used in project, but it's only for win32.
Maybe we can expand it to support other platforms.

PS:

cmake Generators

The following generators are available on this platform (* marks default):
  Green Hills MULTI            = Generates Green Hills MULTI files
                                 (experimental, work-in-progress).
* Unix Makefiles               = Generates standard UNIX makefiles.
  Ninja                        = Generates build.ninja files.
  Ninja Multi-Config           = Generates build-<Config>.ninja files.
  Watcom WMake                 = Generates Watcom WMake makefiles.
  CodeBlocks - Ninja           = Generates CodeBlocks project files
                                 (deprecated).
  CodeBlocks - Unix Makefiles  = Generates CodeBlocks project files
                                 (deprecated).
  CodeLite - Ninja             = Generates CodeLite project files
                                 (deprecated).
  CodeLite - Unix Makefiles    = Generates CodeLite project files
                                 (deprecated).
  Eclipse CDT4 - Ninja         = Generates Eclipse CDT 4.0 project files
                                 (deprecated).
  Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files
                                 (deprecated).
  Kate - Ninja                 = Generates Kate project files (deprecated).
  Kate - Ninja Multi-Config    = Generates Kate project files (deprecated).
  Kate - Unix Makefiles        = Generates Kate project files (deprecated).
  Sublime Text 2 - Ninja       = Generates Sublime Text 2 project files
                                 (deprecated).
  Sublime Text 2 - Unix Makefiles
                               = Generates Sublime Text 2 project files
                                 (deprecated).

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.