| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1905414 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function is handy outside apu_crypto usage, don't require users to link
to APU for the feature.
This commit moves the apr_crypto_memzero() implementation to apr_strings under
the apr_memzero_explicit() name, and replaces the calls to the former with the
latter, and apr_crypto_memzero() now calls apr_memzero_explicit() directly.
* include/apr_strings.h():
Declare apr_memzero_explicit().
* strings/apr_strings.c():
Implement apr_memzero_explicit() by moving/renaming the code from apu_crypto.
* crypto/apr_crypto.c(apr_crypto_memzero):
Fall back to apr_memzero_explicit().
* crypto/apr_crypto.c(crypto_clear):
Use apr_memzero_explicit() instead of apr_crypto_memzero().
* crypto/apr_crypto_prng.c(cprng_cleanup, cprng_stream_bytes,
apr_crypto_prng_reseed, cprng_bytes,
apr_crypto_prng_rekey, apr_crypto_prng_after_fork):
Use apr_memzero_explicit() instead of apr_crypto_memzero().
* crypto/apr_md4.c(MD4Transform):
Use apr_memzero_explicit() instead of apr_crypto_memzero().
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902323 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This ones have a shorter prologue and epilogue (-O2 still).
Dump of assembler code for function apr_cstr_casecmp:
0x0000000000049fd0 <+0>: xor %edx,%edx
0x0000000000049fd2 <+2>: lea 0x3d567(%rip),%r8 # 0x87540 <ucharmap>
0x0000000000049fd9 <+9>: nopl 0x0(%rax)
0x0000000000049fe0 <+16>: movzbl (%rsi,%rdx,1),%eax
0x0000000000049fe4 <+20>: movzbl (%r8,%rax,1),%ecx
0x0000000000049fe9 <+25>: movzbl (%rdi,%rdx,1),%eax
0x0000000000049fed <+29>: add $0x1,%rdx
0x0000000000049ff1 <+33>: movzbl (%r8,%rax,1),%eax
0x0000000000049ff6 <+38>: sub %ecx,%eax
0x0000000000049ff8 <+40>: jne 0x49ffe <apr_cstr_casecmp+46>
0x0000000000049ffa <+42>: test %ecx,%ecx
0x0000000000049ffc <+44>: jne 0x49fe0 <apr_cstr_casecmp+16>
0x0000000000049ffe <+46>: ret
End of assembler dump.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1897121 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new versions [1] compile to a shorter/faster assembly than the previous
ones [2], no functionnal change.
[1] apr_cstr_casecmp() after this commit:
Dump of assembler code for function apr_cstr_casecmp:
0x0000000000049fc0 <+0>: movzbl (%rdi),%eax
0x0000000000049fc3 <+3>: movzbl (%rsi),%edx
0x0000000000049fc6 <+6>: lea 0x3d573(%rip),%r8 # 0x87540 <ucharmap>
0x0000000000049fcd <+13>: movzbl (%r8,%rax,1),%eax
0x0000000000049fd2 <+18>: movzbl (%r8,%rdx,1),%ecx
0x0000000000049fd7 <+23>: cmp %ecx,%eax
0x0000000000049fd9 <+25>: jne 0x49ffe <apr_cstr_casecmp+62>
0x0000000000049fdb <+27>: xor %edx,%edx
0x0000000000049fdd <+29>: jmp 0x49ffa <apr_cstr_casecmp+58>
0x0000000000049fdf <+31>: nop
0x0000000000049fe0 <+32>: add $0x1,%rdx
0x0000000000049fe4 <+36>: movzbl (%rdi,%rdx,1),%eax
0x0000000000049fe8 <+40>: movzbl (%rsi,%rdx,1),%ecx
0x0000000000049fec <+44>: movzbl (%r8,%rax,1),%eax
0x0000000000049ff1 <+49>: movzbl (%r8,%rcx,1),%ecx
0x0000000000049ff6 <+54>: cmp %ecx,%eax
0x0000000000049ff8 <+56>: jne 0x49ffe <apr_cstr_casecmp+62>
0x0000000000049ffa <+58>: test %eax,%eax
0x0000000000049ffc <+60>: jne 0x49fe0 <apr_cstr_casecmp+32>
0x0000000000049ffe <+62>: sub %ecx,%eax
0x000000000004a000 <+64>: ret
End of assembler dump.
[2] apr_cstr_casecmp() before this commit:
Dump of assembler code for function apr_cstr_casecmp:
0x000000000004a000 <+0>: movzbl (%rdi),%eax
0x000000000004a003 <+3>: movzbl (%rsi),%edx
0x000000000004a006 <+6>: lea 0x3d533(%rip),%r8 # 0x87540 <ucharmap>
0x000000000004a00d <+13>: mov %rdi,%r9
0x000000000004a010 <+16>: mov %rax,%rcx
0x000000000004a013 <+19>: movswl (%r8,%rdx,2),%edx
0x000000000004a018 <+24>: movswl (%r8,%rax,2),%eax
0x000000000004a01d <+29>: sub %edx,%eax
0x000000000004a01f <+31>: jne 0x4a052 <apr_cstr_casecmp+82>
0x000000000004a021 <+33>: mov $0x1,%edx
0x000000000004a026 <+38>: test %ecx,%ecx
0x000000000004a028 <+40>: je 0x4a052 <apr_cstr_casecmp+82>
0x000000000004a02a <+42>: nopw 0x0(%rax,%rax,1)
0x000000000004a030 <+48>: movzbl (%r9,%rdx,1),%eax
0x000000000004a035 <+53>: movzbl (%rsi,%rdx,1),%ecx
0x000000000004a039 <+57>: add $0x1,%rdx
0x000000000004a03d <+61>: mov %rax,%rdi
0x000000000004a040 <+64>: movswl (%r8,%rcx,2),%ecx
0x000000000004a045 <+69>: movswl (%r8,%rax,2),%eax
0x000000000004a04a <+74>: sub %ecx,%eax
0x000000000004a04c <+76>: jne 0x4a052 <apr_cstr_casecmp+82>
0x000000000004a04e <+78>: test %edi,%edi
0x000000000004a050 <+80>: jne 0x4a030 <apr_cstr_casecmp+48>
0x000000000004a052 <+82>: ret
End of assembler dump.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1897102 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1887505 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
poffset is undefined there, by inspection (no BEOS at hand..).
[Reverted by r1887502 and r1887505]
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1887500 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
false -ve and there was no functional change nor bug.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1878365 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
part of saved_lengths array when nargs < MAX_SAVED_LENGTHS (fixing
Coverity warning).
* test/teststr.c: Add trivial testcases for apr_pstrcat (though this
does not reproduce any problems from the bug).
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1878354 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1836519 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
declaration to fix Windows build.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1767019 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(as opposed to the array of shorts) really didn't hold up.
Revert back to processing in 'int' amounts, persist in using
short values in the character case folding table, which are
more easily retrieved based on word alignment. Aligning and
representing the table values as 'int' doesn't exhibit any
additional benefit and wastes some DATA page space.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1747461 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
functional int which requires 1. no unsigned -> signed
promotion, 2. fetches from a word aligned offset from
the lookup table, 3. is easily promoted to int upon the
function's return. This introduces a very small 2% speed
improvement in several cases.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1747460 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1747425 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1747424 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
family of functions. Requires the introduction of APR_ERANGE.
Solves apr_cstr_casecmp[n] for ASCII and EBCDIC and borrows
from the work of jim, ylavic and wrowe, see r1715401 forwards in;
http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util.c?view=log&pathrev=1722194
More performance review is needed against different compilers, so went ahead
and borrowed original svn implementation as a basis, and we can port whichever
performance enhancements test out more efficiently.
Proposing for APR 1.6.0 which is the thought behind the initial @since tags.
These must be changed if not accepted for backport.
Note that the svn_cstring_join function could not be implemented as-is
due to the absence of svn's counted string functionality. It deserves
an implementation if not already present, or should be removed before
tagging or backporting.
No whitespace/formatting cleanup on this pass in order to preserve as
much of the svn attributions as possible. This can happen in a later
pass to conform to APR's style conventions. While renaming the functions,
declarations themsel
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1726928 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
save a few cycles.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1710307 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1683221 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
in strdup() fallback function
PR: 56385
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1593680 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
is a little quieter
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1534882 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1533111 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1533104 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
character 'x' in apr snprintf implementations.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1152309 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1124997 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1124326 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1103115 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1103091 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1103070 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1103066 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
optimize the exception cases to bust the loop early.
Clean up documentation a bit.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1103046 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
to compose the proper test-case to expose.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1103041 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1102995 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1102992 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1098904 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
correctly, while 'x?' was not. Resolves one alert, assignment
within conditional expression, for pedantic compilers.
Forward ports: r1098799
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1098805 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by: Maksymilian Arciemowicz <cxib securityreason.com>
Excessive CPU consumption was possible due to the unconstrained, recursive
invocation of apr_fnmatch, as apr_fnmatch processed '*' wildcards.
Introduce new apr_fnmatch implementation. This delivers optimizations
in some common cases, without the underlying weakness of recursion
present in older implementations.
Submitted by: William Rowe
Forward port: r1098289
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1098292 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
PR: 47776
Submitted by: Boya Sun <boya.sun case.edu>
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1089438 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1060659 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
int64 (and APR_INT64_T_FMT).
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1060104 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
Cases were observed where apr_strtoi64 returned with a
previously set errno although the operation worked fine.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@727052 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
PR 46128.
Patch by Edward Rudd <eddie omegaware.com>
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@712627 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@660373 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Caldera International Inc.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@652832 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
Spotted by: Sebastian Gottschalk <seppig_relay gmx.de>
Reviewed by: rpluem
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@630528 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
types.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@554692 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
wide_int apr_int32_t
u_wide_int apr_uint32_t
widest_int apr_int64_t
u_widest_int apr_uint64_t
bool_int int
Passes testfmt.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@553679 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
human readable form. Based upon apr_strfsize.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@551923 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
ugly casts.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@551922 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
using APR_SIZEOF_VOIDP.
PR: 40758
Submitted by: Davi Arnaut <davi@haxent.com.br>
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@543274 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
integers between 2^63 and 2^64 on 32-bit platforms.
* test/testfmt.c (more_int64_fmts): Test an even bigger unsigned
int64.
Submitted by: Wynn Wilkes <wynn bungeelabs.com>
PR: 42250
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@532733 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
then (*pattern++ == '\0') will always fail. Need to advance the
pointer *before* the comparison.
Reviewed: jerenkrantz
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@454200 13f79535-47bb-0310-9956-ffa450edef68
|