IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Using `pkg_check_modules(FOO IMPORTED_TARGET foo)` with
`target_link_libraries()` leads to `INTERFACE_LINK_LIBRARIES` in the
resulting export file having `\$<LINK_ONLY:PkgConfig::FOO>` rather than
the currently expected `\$<LINK_ONLY:FOO::FOO>`, leading to breakage.
This can be worked around like so:
target_link_libraries(UseFoo
PUBLIC "$<BUILD_INTERFACE:PkgConfig::FOO>"
INTERFACE "$<INSTALL_INTERFACE:FOO::FOO>"
)
However, following some discussion, it is preferable to primarily use
find modules as before and only use `pkg_check_modules` for correctly
populating the .pc file.
Also move `find_package()` calls earlier so that builds fail faster when
dependencies are missing.
If they were required when building libxml2 then they will also be
required when statically linking against it. Failing to find them will
just lead to undefined references later so detect this early.
It seems that thread-local storage destructors are run before pthread
thread-specific data destructors on Darwin, defeating our scheme to use
TSD to clean up TLS.
Here's an example program that reports a use-after-free when compiled
with `-fsanitize=address` on macOS:
#include <pthread.h>
typedef struct {
int v;
} my_struct;
static _Thread_local my_struct tls;
pthread_key_t key;
void dtor(void *tsd) {
my_struct *s = (my_struct *) tsd;
/*
* This will crash ASan, apparently because
* TLS has already been freed.
*/
s->v = 1;
}
void *thread(void *p) {
pthread_setspecific(key, &tls);
return NULL;
}
int main(void) {
pthread_key_create(&key, dtor);
pthread_t handle;
pthread_create(&handle, NULL, thread, NULL);
pthread_join(handle, NULL);
return 0;
}
This is a slight break of the API, but users really shouldn't modify the
global error struct. The goal is to make xmlLastError use static buffers
for its strings eventually. This should warn people if they're abusing
the struct.
On Windows, malloc hooks can be called after the final call to
xmlCleanupParser in various tests. This means that xmlMemMutex can still
be accessed if memory debugging is enabled, so the mutex should not be
cleaned.
This also means that tests may report spurious memory leaks on Windows.
The old implementation avoided the issue by keeping track of all
global state objects in a doubly linked list, so they could be cleaned
during xmlCleanupParser.
But as far as I can tell all memory will be freed eventually, so this is
mostly an issue with our test suite.
Also run CI tests with a build where most modules except a few are
disabled. This is the minimum configuration required for libxslt:
--with-tree --with-xpath --with-output --with-html
Also add --with-threads.
-Wnested-externs produces spurious warnings after implicit
declaration of functions.
-Winline is useless since we don't use inlines.
-Wredundant-decls was already removed for autotools.
Note that setting global options has no effect anyway when using any of
the modern parser API functions which take an option argument like
xmlReadMemory or when using xmlCtxtUseOptions.
Global options only have an effect when using old API functions
xmlParse* or xmlSAXParse* or when using an xmlParserCtxt without calling
xmlCtxtUseOptions.
Unfortunately, many downstream projects still modify global parser
options often without realizing that it has no effect. If necessary,
switch to the modern API. Then you can safely remove all code that
changes global options.
Here's a list of deprecated functions and global variables together with
the corresponding parser options.
- xmlSubstituteEntitiesDefault, xmlSubstituteEntitiesDefaultValue
Parser option XML_PARSE_NOENT
- xmlKeepBlanksDefault, xmlKeepBlanksDefaultValue
Inverse of parser option XML_PARSE_NOBLANKS
- xmlPedanticParserDefault, xmlPedanticParserDefaultValue
Parser option XML_PARSE_PEDANTIC
- xmlLineNumbersDefault, xmlLineNumbersDefaultValue
Always enabled by new API
- xmlDoValidityCheckingDefaultValue
Parser option XML_PARSE_DTDVALID
- xmlGetWarningsDefaultValue
Inverse of parser option XML_PARSE_NOWARNING
- xmlLoadExtDtdDefaultValue
Parser options XML_PARSE_DTDLOAD and XML_PARSE_DTDATTR