forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Test sanitizer #97
Open
nielsdos
wants to merge
1,313
commits into
master
Choose a base branch
from
vs-sanitizer
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Test sanitizer #97
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The union semun is always defined in php-src code. Current systems require user to define it manually as done in the ext/sysvsem/sysvsem.c. The conditional checks for HAVE_SEMUN were unused. The PHP 3.0.12 AIX bug bugs.php.net/2149 was fixed by the removal of __GNU_LIBRARY__ check, so this now further simplifies the code. The Autoconf AC_CHECK_TYPES checks if system by any chance has the union semun, and by default defines the HAVE_UNION_SEMUN.
The sysconf can be assumed to be present on current systems, when checking for the _SC_CLK_TCK symbol.
Method to quote strings in XPath, similar to PDO::quote() / mysqli::real_escape_string. Sample usage: $xp->query("//span[contains(text()," . $xp->quote($string) . ")]") The algorithm is derived from Robert Rossney's research into XPath quoting published at https://stackoverflow.com/a/1352556/1067003 But using an improved implementation I wrote myself, originally for chrome-php/chrome#575
In sapi/fpm the inet_ntop is used instead of the deprecated inet_addr and the required library, if needed, is linked from the configure.ac.
This never resulted in a working XPath object anyway, as trying to query or evaluate anything resulted in an "Invalid XPath context" error. Supporting this is more trouble than it's worth, so just block the clone operation.
AC_SEARCH_LIBS can be used to check for dlopen and if dl library needs to be prepended to LIBS. The dlsym is available with the same scope as dlopen (if dlopen is present, also dlsym is). The redundant HAVE_DLOPEN and HAVE_DLSYM symbols have been removed.
On some systems (Haiku) the math library is part of the C library and it doesn't need to be explicitly prepended to LIBS. The redundant HAVE_LIBM symbol defined by the AC_CHECK_LIB has been removed.
Similar simplification as e72f0c8.
This removes the deprecated inet_aton and its Windows implementation. The inet_aton can be replaced with platform agnostic inet_pton. Closes phpGH-13479
Now that ext/imap is unbundled, `libc-client-dev*` packages are no longer necessary.
This simplifies the check and defines the symbol with description.
When AC_DEFINE is called after some macro that has already defined the symbol with description (help text), it can be called with two arguments to make things easier. [ci skip]
…streams_context This was previously untested and the branch was not covered according to codecov.
The value will always be overwritten.
The libtool --silent option for PHP build invocation is already set in the configure.ac.
) - Declared compatibility expectations of stub files are now enforced by a ZEND_STATIC_ASSERT call at the top of arginfo files - Property registration for PHP 7 is fixed: function zend_declare_property_ex() is used again instead of zend_declare_typed_property(). This has been a regression since I added support for exposing doc comments. - As a defensive measure, deep cloning is performed before newer features (type declarations, attributes etc.) are discarded before generating legacy arginfo files. Until now, some of the objects were forgotten to be taken care of. These omissions may have resulted in some weird bugs in theory (but probably they didn't have much impact in practice). - PHP version related conditions inside *non-legacy arginfo files* used to possibly check for the 70000 version iD until now if compatibility with PHP 7.0 was declared in a stub. This was not 100% correct, since non-legacy arginfo files are only for PHP 8.0+. Now, I made sure that at least PHP version ID 80000 is used in the preprocessor conditions. The solution was a bit tricky though...
pdo/php_pdo_int.h is not part of the PDO's headers to install.
Basically all constants are now declared via stubs. The rest of the constants are either deprecated (`SID` or `MHASH_*`) or out of interest (`__COMPILER_HALT_OFFSET__` and `PHP_CLI_PROCESS_TITLE`).
… buffer size (php#13676) Compress interned string table offsets and increase maximum supported buffer size The interned string buffer is organized as a header + a hash table + a zend_string arena. Hash slots point to the arena, but are represented as 32bit offsets from the buffer, which limits the maximum buffer size to about 4GiB. However zend_strings are 8-byte aligned in the buffer, so we can compress the 3 lower bits. This allows to increase the maximum supported interned string buffer size from 4095 MiB to 32767 MiB.
* PHP-8.3: Fix ASan build
Now that the CombinedLCG is no longer used within GENERATE_SEED(), we can safely use the CSPRNG with a php_random_generate_fallback_seed() fallback to seed the CombinedLCG.
13.2 is going to be EOL. close phpGH-13622
php#13761) As all the input bits and pieces are mixed with SHA-1, cross-architecture compatibility is not required and we can just mix in whatever they may look like in memory, instead of going through the `write_*()` helpers that were created for a previous in-development version that first filled a buffer that was then hashed (allowing for easy inspection of the input data, but making it harder to safely add values without checking for buffer overflows all the time). This change should also fix a build error on macOS ZTS: The thread ID is an opaque type and not guaranteed to be arithmetic as per IEEE Std 1003.1-2017. And indeed macOS defines it as a pointer to a structure, failing due to the implicit pointer to integer conversion.
* PHP-8.3: Restore error handler after running it
* PHP-8.3: Fix phpdoc for DOMDocument load methods
Move some of the DOM APIs from the non-public php_dom.h header to the public header xml_common.h.
This removes the unused and obsolete Zend/zend_istdiostream.h header and symbols on Windows: - HAVE_STDIOSTR_H - HAVE_CLASS_ISTDIOSTREAM - istdiostream
Shared objects of extensions during the *nix build are copied to the `modules` directory. It is a practice established since the early days of the PHP build system. Other build systems may have similar concept of "library destination directory". On Windows, they are put into the root build directory. Such directory simplifies collection of the shared extensions during testing, or when running the cli executable at the end of the build process. This change ensures that the directory is consistently created in a single location, for both the primary PHP build process and when utilizing `phpize` within community extensions. The AC_CONFIG_COMMANDS_PRE is executed at the end of the configuration phase, before creating the config.status script, where also build directories and global Makefile are created. The pwd is executed using the recommended $(...) instead of the obsolete backticks. Autoconf automatically locates the proper shell and re-executes the configure script if such case is found that $(...) is not supported (the initial /bin/sh on Solaris 10, for example).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.