diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-12-23 14:47:06 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-12-23 14:47:06 +0900 |
commit | 9c08bb3b899936e1eb9b6ab9d0cef17501ad6bab (patch) | |
tree | 72d73f1b68aa4008381381be8a054346881a5870 | |
parent | de92b8ea19562961f973960c0f8f5aec7f6d9c75 (diff) | |
download | libsolv-9c08bb3b899936e1eb9b6ab9d0cef17501ad6bab.tar.gz libsolv-9c08bb3b899936e1eb9b6ab9d0cef17501ad6bab.tar.bz2 libsolv-9c08bb3b899936e1eb9b6ab9d0cef17501ad6bab.zip |
Imported Upstream version 0.7.18upstream/0.7.18
-rw-r--r-- | .travis.yml | 6 | ||||
-rw-r--r-- | NEWS | 7 | ||||
-rw-r--r-- | VERSION.cmake | 2 | ||||
-rw-r--r-- | ext/repo_conda.c | 8 | ||||
-rw-r--r-- | ext/repo_conda.h | 2 | ||||
-rw-r--r-- | package/libsolv.changes | 8 | ||||
-rw-r--r-- | src/rules.c | 1 | ||||
-rw-r--r-- | win32/regex.h | 3 | ||||
-rw-r--r-- | win32/regexec.c | 10 | ||||
-rw-r--r-- | win32/tre-mem.c | 2 | ||||
-rw-r--r-- | win32/tre.h | 5 |
11 files changed, 39 insertions, 15 deletions
diff --git a/.travis.yml b/.travis.yml index a115095..4e8fd75 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,12 @@ matrix: apt: packages: - cmake + - os: linux + arch: ppc64le + addons: + apt: + packages: + - cmake - os: osx osx_image: xcode9.4 compiler: clang @@ -2,6 +2,13 @@ This file contains the major changes between libsolv versions: +Version 0.7.18 +- selected bug fixes: + * fixed regex code on win32 + * fixed memory leak in choice rule generation +- new features: + * repo_add_conda: add flag to skip v2 packages + Version 0.7.17 - selected bug fixes: * repo_write: fix handling of nested flexarray diff --git a/VERSION.cmake b/VERSION.cmake index adf18d2..8a96a14 100644 --- a/VERSION.cmake +++ b/VERSION.cmake @@ -49,5 +49,5 @@ SET(LIBSOLVEXT_SOVERSION "1") SET(LIBSOLV_MAJOR "0") SET(LIBSOLV_MINOR "7") -SET(LIBSOLV_PATCH "17") +SET(LIBSOLV_PATCH "18") diff --git a/ext/repo_conda.c b/ext/repo_conda.c index 6e9a963..c35dc62 100644 --- a/ext/repo_conda.c +++ b/ext/repo_conda.c @@ -258,7 +258,7 @@ parse_packages2(struct parsedata *pd, struct solv_jsonparser *jp) } static int -parse_main(struct parsedata *pd, struct solv_jsonparser *jp) +parse_main(struct parsedata *pd, struct solv_jsonparser *jp, int flags) { int type = JP_OBJECT; while (type > 0 && (type = jsonparser_parse(jp)) > 0 && type != JP_OBJECT_END) @@ -267,9 +267,9 @@ parse_main(struct parsedata *pd, struct solv_jsonparser *jp) type = parse_packages(pd, jp); else if (type == JP_ARRAY && !strcmp("packages", jp->key)) type = parse_packages2(pd, jp); - else if (type == JP_OBJECT && !strcmp("packages.conda", jp->key)) + else if (type == JP_OBJECT && !strcmp("packages.conda", jp->key) && !(flags & CONDA_ADD_USE_ONLY_TAR_BZ2)) type = parse_packages(pd, jp); - else if (type == JP_ARRAY && !strcmp("packages.conda", jp->key)) + else if (type == JP_ARRAY && !strcmp("packages.conda", jp->key) && !(flags & CONDA_ADD_USE_ONLY_TAR_BZ2)) type = parse_packages2(pd, jp); else type = jsonparser_skip(jp, type); @@ -298,7 +298,7 @@ repo_add_conda(Repo *repo, FILE *fp, int flags) jsonparser_init(&jp, fp); if ((type = jsonparser_parse(&jp)) != JP_OBJECT) ret = pool_error(pool, -1, "repository does not start with an object"); - else if ((type = parse_main(&pd, &jp)) != JP_OBJECT_END) + else if ((type = parse_main(&pd, &jp, flags)) != JP_OBJECT_END) ret = pool_error(pool, -1, "parse error line %d", jp.line); jsonparser_free(&jp); diff --git a/ext/repo_conda.h b/ext/repo_conda.h index 7e90a3d..fa626f1 100644 --- a/ext/repo_conda.h +++ b/ext/repo_conda.h @@ -5,4 +5,6 @@ * for further information */ +#define CONDA_ADD_USE_ONLY_TAR_BZ2 (1 << 8) + extern int repo_add_conda(Repo *repo, FILE *fp, int flags); diff --git a/package/libsolv.changes b/package/libsolv.changes index d477d71..32ec121 100644 --- a/package/libsolv.changes +++ b/package/libsolv.changes @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Fri Mar 26 14:17:46 CET 2021 - mls@suse.de + +- fixed regex code on win32 +- fixed memory leak in choice rule generation +- repo_add_conda: add flag to skip v2 packages +- bump version to 0.7.18 + +------------------------------------------------------------------- Tue Jan 19 15:09:12 CET 2021 - mls@suse.de - repo_write: fix handling of nested flexarray diff --git a/src/rules.c b/src/rules.c index b3609bb..b1b5f09 100644 --- a/src/rules.c +++ b/src/rules.c @@ -3339,7 +3339,6 @@ solver_addchoicerules(Solver *solv) return; } now = solv_timems(0); - solv->choicerules_info = solv_calloc(solv->pkgrules_end, sizeof(Id)); queue_init(&q); queue_init(&qi); queue_init(&qcheck); diff --git a/win32/regex.h b/win32/regex.h index 7996b58..06a1090 100644 --- a/win32/regex.h +++ b/win32/regex.h @@ -12,7 +12,8 @@ extern "C" { #define CHARCLASS_NAME_MAX 14 #define RE_DUP_MAX 255 -typedef size_t regoff_t; +#include <BaseTsd.h> +typedef SSIZE_T regoff_t; // #include <bits/alltypes.h> typedef struct re_pattern_buffer { diff --git a/win32/regexec.c b/win32/regexec.c index f22586e..61e40a5 100644 --- a/win32/regexec.c +++ b/win32/regexec.c @@ -231,7 +231,7 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string, pbytes = sizeof(*reach_pos) * tnfa->num_states; xbytes = sizeof(regoff_t) * num_tags; total_bytes = - (sizeof(long) - 1) * 4 /* for alignment paddings */ + (sizeof(size_t) - 1) * 4 /* for alignment paddings */ + (rbytes + xbytes * tnfa->num_states) * 2 + tbytes + pbytes; /* Allocate the memory. */ @@ -242,16 +242,16 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string, /* Get the various pointers within tmp_buf (properly aligned). */ tmp_tags = (void *)buf; tmp_buf = buf + tbytes; - tmp_buf += ALIGN(tmp_buf, long); + tmp_buf += ALIGN(tmp_buf, size_t); reach_next = (void *)tmp_buf; tmp_buf += rbytes; - tmp_buf += ALIGN(tmp_buf, long); + tmp_buf += ALIGN(tmp_buf, size_t); reach = (void *)tmp_buf; tmp_buf += rbytes; - tmp_buf += ALIGN(tmp_buf, long); + tmp_buf += ALIGN(tmp_buf, size_t); reach_pos = (void *)tmp_buf; tmp_buf += pbytes; - tmp_buf += ALIGN(tmp_buf, long); + tmp_buf += ALIGN(tmp_buf, size_t); for (i = 0; i < tnfa->num_states; i++) { reach[i].tags = (void *)tmp_buf; diff --git a/win32/tre-mem.c b/win32/tre-mem.c index 0fbf7b2..327515b 100644 --- a/win32/tre-mem.c +++ b/win32/tre-mem.c @@ -143,7 +143,7 @@ tre_mem_alloc_impl(tre_mem_t mem, int provided, void *provided_block, } /* Make sure the next pointer will be aligned. */ - size += ALIGN(mem->ptr + size, long); + size += ALIGN(mem->ptr + size, size_t); /* Allocate from current block. */ ptr = mem->ptr; diff --git a/win32/tre.h b/win32/tre.h index c07c959..390df94 100644 --- a/win32/tre.h +++ b/win32/tre.h @@ -32,6 +32,7 @@ #include <regex.h> #include <wchar.h> #include <wctype.h> +#include <stdint.h> #undef TRE_MBSTATE @@ -77,8 +78,8 @@ typedef wctype_t tre_ctype_t; /* Returns number of bytes to add to (char *)ptr to make it properly aligned for the type. */ #define ALIGN(ptr, type) \ - ((((long)ptr) % sizeof(type)) \ - ? (sizeof(type) - (((long)ptr) % sizeof(type))) \ + ((((uintptr_t)ptr) % sizeof(type)) \ + ? (sizeof(type) - (((uintptr_t)ptr) % sizeof(type))) \ : 0) #undef MAX |