CVS commit: src/common/lib/libprop
Module Name:src Committed By: thorpej Date: Fri Nov 17 21:29:33 UTC 2023 Modified Files: src/common/lib/libprop: prop_string.c Log Message: In _prop_string_instantiate(), when we de-dup a non-MUTABLE string, make sure we free the provided string buffer if NOCOPY is not set. Fixes a memory leak reported by M. Boerschig. While we're at it, also change _prop_string_instantiate() to free the provided string buffer in the not-NOCOPY case when string object allocation fails (this was previously handled by _prop_string_instantiate()'s callers). PR lib/57699 To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/common/lib/libprop/prop_string.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libprop
Module Name:src Committed By: thorpej Date: Fri Nov 17 21:29:33 UTC 2023 Modified Files: src/common/lib/libprop: prop_string.c Log Message: In _prop_string_instantiate(), when we de-dup a non-MUTABLE string, make sure we free the provided string buffer if NOCOPY is not set. Fixes a memory leak reported by M. Boerschig. While we're at it, also change _prop_string_instantiate() to free the provided string buffer in the not-NOCOPY case when string object allocation fails (this was previously handled by _prop_string_instantiate()'s callers). PR lib/57699 To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/common/lib/libprop/prop_string.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libprop/prop_string.c diff -u src/common/lib/libprop/prop_string.c:1.17 src/common/lib/libprop/prop_string.c:1.18 --- src/common/lib/libprop/prop_string.c:1.17 Wed Aug 3 21:13:46 2022 +++ src/common/lib/libprop/prop_string.c Fri Nov 17 21:29:33 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: prop_string.c,v 1.17 2022/08/03 21:13:46 riastradh Exp $ */ +/* $NetBSD: prop_string.c,v 1.18 2023/11/17 21:29:33 thorpej Exp $ */ /*- * Copyright (c) 2006, 2020 The NetBSD Foundation, Inc. @@ -247,12 +247,18 @@ _prop_string_instantiate(int const flags */ prop_object_retain(ops); _PROP_MUTEX_UNLOCK(_prop_string_tree_mutex); +if ((flags & PS_F_NOCOPY) == 0) { + _PROP_FREE(ps->ps_mutable, + M_PROP_STRING); +} _PROP_POOL_PUT(_prop_string_pool, ps); ps = ops; } else { _PROP_MUTEX_UNLOCK(_prop_string_tree_mutex); } } + } else if ((flags & PS_F_NOCOPY) == 0) { + _PROP_FREE(__UNCONST(str), M_PROP_STRING); } return (ps); @@ -311,7 +317,6 @@ prop_string_create_cstring_nocopy(const prop_string_t __printflike(1, 2) prop_string_create_format(const char *fmt, ...) { - prop_string_t ps; char *str = NULL; int len; size_t nlen; @@ -335,11 +340,7 @@ prop_string_create_format(const char *fm vsnprintf(str, nlen, fmt, ap); va_end(ap); - ps = _prop_string_instantiate(0, str, (size_t)len); - if (ps == NULL) - _PROP_FREE(str, M_PROP_STRING); - - return (ps); + return _prop_string_instantiate(0, str, (size_t)len); } /* @@ -374,7 +375,6 @@ prop_string_create_nocopy(const char *st prop_string_t prop_string_copy(prop_string_t ops) { - prop_string_t ps; char *cp; if (! prop_object_is_string(ops)) @@ -391,11 +391,7 @@ prop_string_copy(prop_string_t ops) strcpy(cp, prop_string_contents(ops)); - ps = _prop_string_instantiate(PS_F_MUTABLE, cp, ops->ps_size); - if (ps == NULL) - _PROP_FREE(cp, M_PROP_STRING); - - return (ps); + return _prop_string_instantiate(PS_F_MUTABLE, cp, ops->ps_size); } _PROP_DEPRECATED(prop_string_copy_mutable, @@ -404,7 +400,6 @@ _PROP_DEPRECATED(prop_string_copy_mutabl prop_string_t prop_string_copy_mutable(prop_string_t ops) { - prop_string_t ps; char *cp; if (! prop_object_is_string(ops)) @@ -416,11 +411,7 @@ prop_string_copy_mutable(prop_string_t o strcpy(cp, prop_string_contents(ops)); - ps = _prop_string_instantiate(PS_F_MUTABLE, cp, ops->ps_size); - if (ps == NULL) - _PROP_FREE(cp, M_PROP_STRING); - - return (ps); + return _prop_string_instantiate(PS_F_MUTABLE, cp, ops->ps_size); } /* @@ -655,7 +646,6 @@ bool _prop_string_internalize(prop_stack_t stack, prop_object_t *obj, struct _prop_object_internalize_context *ctx) { - prop_string_t string; char *str; size_t len, alen; @@ -691,10 +681,6 @@ _prop_string_internalize(prop_stack_t st return (true); } - string = _prop_string_instantiate(0, str, len); - if (string == NULL) - _PROP_FREE(str, M_PROP_STRING); - - *obj = string; + *obj = _prop_string_instantiate(0, str, len); return (true); }
CVS commit: src/common/lib/libprop
Module Name:src Committed By: rin Date: Wed Jun 14 00:35:19 UTC 2023 Modified Files: src/common/lib/libprop: prop_dictionary.c Log Message: Sprinkle braces around _PROP_RWLOCK_UNLOCK() in ``if'' block. It is expanded into /* nothing */ for _STANDALONE. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/common/lib/libprop/prop_dictionary.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libprop/prop_dictionary.c diff -u src/common/lib/libprop/prop_dictionary.c:1.45 src/common/lib/libprop/prop_dictionary.c:1.46 --- src/common/lib/libprop/prop_dictionary.c:1.45 Wed Aug 3 21:13:46 2022 +++ src/common/lib/libprop/prop_dictionary.c Wed Jun 14 00:35:18 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: prop_dictionary.c,v 1.45 2022/08/03 21:13:46 riastradh Exp $ */ +/* $NetBSD: prop_dictionary.c,v 1.46 2023/06/14 00:35:18 rin Exp $ */ /*- * Copyright (c) 2006, 2007, 2020 The NetBSD Foundation, Inc. @@ -915,15 +915,17 @@ _prop_dictionary_get(prop_dictionary_t p if (! prop_object_is_dictionary(pd)) return (NULL); - if (!locked) + if (!locked) { _PROP_RWLOCK_RDLOCK(pd->pd_rwlock); + } pde = _prop_dict_lookup(pd, key, NULL); if (pde != NULL) { _PROP_ASSERT(pde->pde_objref != NULL); po = pde->pde_objref; } - if (!locked) + if (!locked) { _PROP_RWLOCK_UNLOCK(pd->pd_rwlock); + } return (po); } /*
CVS commit: src/common/lib/libprop
Module Name:src Committed By: rin Date: Wed Jun 14 00:35:19 UTC 2023 Modified Files: src/common/lib/libprop: prop_dictionary.c Log Message: Sprinkle braces around _PROP_RWLOCK_UNLOCK() in ``if'' block. It is expanded into /* nothing */ for _STANDALONE. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/common/lib/libprop/prop_dictionary.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libprop
Module Name:src Committed By: riastradh Date: Sun Aug 7 23:49:46 UTC 2022 Modified Files: src/common/lib/libprop: prop_object.c Log Message: proplib: Allocate sizeof(*ctx), not sizeof(struct ...). No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/common/lib/libprop/prop_object.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libprop/prop_object.c diff -u src/common/lib/libprop/prop_object.c:1.34 src/common/lib/libprop/prop_object.c:1.35 --- src/common/lib/libprop/prop_object.c:1.34 Thu Aug 4 09:02:29 2022 +++ src/common/lib/libprop/prop_object.c Sun Aug 7 23:49:46 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: prop_object.c,v 1.34 2022/08/04 09:02:29 riastradh Exp $ */ +/* $NetBSD: prop_object.c,v 1.35 2022/08/07 23:49:46 riastradh Exp $ */ /*- * Copyright (c) 2006, 2007 The NetBSD Foundation, Inc. @@ -718,8 +718,7 @@ _prop_object_internalize_context_alloc(c { struct _prop_object_internalize_context *ctx; - ctx = _PROP_MALLOC(sizeof(struct _prop_object_internalize_context), - M_TEMP); + ctx = _PROP_MALLOC(sizeof(*ctx), M_TEMP); if (ctx == NULL) return (NULL);
CVS commit: src/common/lib/libprop
Module Name:src Committed By: riastradh Date: Sun Aug 7 23:49:46 UTC 2022 Modified Files: src/common/lib/libprop: prop_object.c Log Message: proplib: Allocate sizeof(*ctx), not sizeof(struct ...). No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/common/lib/libprop/prop_object.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libprop
Module Name:src Committed By: riastradh Date: Thu Aug 4 09:02:29 UTC 2022 Modified Files: src/common/lib/libprop: prop_object.c Log Message: proplib: Fix mistake in previous -- use strncmp for prefix matching. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/common/lib/libprop/prop_object.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libprop/prop_object.c diff -u src/common/lib/libprop/prop_object.c:1.33 src/common/lib/libprop/prop_object.c:1.34 --- src/common/lib/libprop/prop_object.c:1.33 Wed Aug 3 21:20:21 2022 +++ src/common/lib/libprop/prop_object.c Thu Aug 4 09:02:29 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: prop_object.c,v 1.33 2022/08/03 21:20:21 riastradh Exp $ */ +/* $NetBSD: prop_object.c,v 1.34 2022/08/04 09:02:29 riastradh Exp $ */ /*- * Copyright (c) 2006, 2007 The NetBSD Foundation, Inc. @@ -735,7 +735,7 @@ _prop_object_internalize_context_alloc(c if (_PROP_EOF(*xml) || *xml != '<') goto bad; -#define MATCH(str) (strcmp(&xml[1], str) == 0) +#define MATCH(str) (strncmp(&xml[1], str, strlen(str)) == 0) /* * Skip over the XML preamble that Apple XML property
CVS commit: src/common/lib/libprop
Module Name:src Committed By: riastradh Date: Thu Aug 4 09:02:29 UTC 2022 Modified Files: src/common/lib/libprop: prop_object.c Log Message: proplib: Fix mistake in previous -- use strncmp for prefix matching. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/common/lib/libprop/prop_object.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libprop
Module Name:src Committed By: riastradh Date: Wed Aug 3 21:20:21 UTC 2022 Modified Files: src/common/lib/libprop: prop_object.c Log Message: proplib: Don't run off end of buffer with memcmp. The input is required to be NUL-terminated anyway, so just use strcmp here. Reported-by: syzbot+69838802c8ec55909...@syzkaller.appspotmail.com https://syzkaller.appspot.com/bug?id=927d66e8aa079ba2be43497425a6d9878025ad09 To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/common/lib/libprop/prop_object.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libprop/prop_object.c diff -u src/common/lib/libprop/prop_object.c:1.32 src/common/lib/libprop/prop_object.c:1.33 --- src/common/lib/libprop/prop_object.c:1.32 Wed Aug 3 21:13:46 2022 +++ src/common/lib/libprop/prop_object.c Wed Aug 3 21:20:21 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: prop_object.c,v 1.32 2022/08/03 21:13:46 riastradh Exp $ */ +/* $NetBSD: prop_object.c,v 1.33 2022/08/03 21:20:21 riastradh Exp $ */ /*- * Copyright (c) 2006, 2007 The NetBSD Foundation, Inc. @@ -735,7 +735,7 @@ _prop_object_internalize_context_alloc(c if (_PROP_EOF(*xml) || *xml != '<') goto bad; -#define MATCH(str) (memcmp(&xml[1], str, sizeof(str) - 1) == 0) +#define MATCH(str) (strcmp(&xml[1], str) == 0) /* * Skip over the XML preamble that Apple XML property
CVS commit: src/common/lib/libprop
Module Name:src Committed By: riastradh Date: Wed Aug 3 21:20:21 UTC 2022 Modified Files: src/common/lib/libprop: prop_object.c Log Message: proplib: Don't run off end of buffer with memcmp. The input is required to be NUL-terminated anyway, so just use strcmp here. Reported-by: syzbot+69838802c8ec55909...@syzkaller.appspotmail.com https://syzkaller.appspot.com/bug?id=927d66e8aa079ba2be43497425a6d9878025ad09 To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/common/lib/libprop/prop_object.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libprop
Module Name:src Committed By: riastradh Date: Wed Aug 3 21:13:46 UTC 2022 Modified Files: src/common/lib/libprop: prop_array_util.c prop_data.c prop_dictionary.c prop_dictionary_util.c prop_kern.c prop_number.c prop_object.c prop_string.c Log Message: proplib: Nix trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/common/lib/libprop/prop_array_util.c \ src/common/lib/libprop/prop_dictionary_util.c cvs rdiff -u -r1.17 -r1.18 src/common/lib/libprop/prop_data.c cvs rdiff -u -r1.44 -r1.45 src/common/lib/libprop/prop_dictionary.c cvs rdiff -u -r1.24 -r1.25 src/common/lib/libprop/prop_kern.c cvs rdiff -u -r1.33 -r1.34 src/common/lib/libprop/prop_number.c cvs rdiff -u -r1.31 -r1.32 src/common/lib/libprop/prop_object.c cvs rdiff -u -r1.16 -r1.17 src/common/lib/libprop/prop_string.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libprop/prop_array_util.c diff -u src/common/lib/libprop/prop_array_util.c:1.8 src/common/lib/libprop/prop_array_util.c:1.9 --- src/common/lib/libprop/prop_array_util.c:1.8 Sun Jun 14 21:31:01 2020 +++ src/common/lib/libprop/prop_array_util.c Wed Aug 3 21:13:46 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: prop_array_util.c,v 1.8 2020/06/14 21:31:01 christos Exp $ */ +/* $NetBSD: prop_array_util.c,v 1.9 2022/08/03 21:13:46 riastradh Exp $ */ /*- * Copyright (c) 2006, 2020 The NetBSD Foundation, Inc. @@ -49,7 +49,7 @@ prop_array_get_bool(prop_array_t array, b = prop_array_get(array, indx); if (prop_object_type(b) != PROP_TYPE_BOOL) return (false); - + *valp = prop_bool_true(b); return (true); Index: src/common/lib/libprop/prop_dictionary_util.c diff -u src/common/lib/libprop/prop_dictionary_util.c:1.8 src/common/lib/libprop/prop_dictionary_util.c:1.9 --- src/common/lib/libprop/prop_dictionary_util.c:1.8 Mon Jun 15 00:46:00 2020 +++ src/common/lib/libprop/prop_dictionary_util.c Wed Aug 3 21:13:46 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: prop_dictionary_util.c,v 1.8 2020/06/15 00:46:00 christos Exp $ */ +/* $NetBSD: prop_dictionary_util.c,v 1.9 2022/08/03 21:13:46 riastradh Exp $ */ /*- * Copyright (c) 2006, 2020 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ prop_dictionary_get_bool(prop_dictionary b = prop_dictionary_get(dict, key); if (prop_object_type(b) != PROP_TYPE_BOOL) return (false); - + *valp = prop_bool_true(b); return (true); @@ -179,7 +179,7 @@ prop_dictionary_get_string(prop_dictiona cp = prop_string_value(str); if (cp == NULL) return (false); - + *cpp = cp; return (true); } Index: src/common/lib/libprop/prop_data.c diff -u src/common/lib/libprop/prop_data.c:1.17 src/common/lib/libprop/prop_data.c:1.18 --- src/common/lib/libprop/prop_data.c:1.17 Mon Jun 8 21:31:56 2020 +++ src/common/lib/libprop/prop_data.c Wed Aug 3 21:13:46 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: prop_data.c,v 1.17 2020/06/08 21:31:56 thorpej Exp $ */ +/* $NetBSD: prop_data.c,v 1.18 2022/08/03 21:13:46 riastradh Exp $ */ /*- * Copyright (c) 2006, 2020 The NetBSD Foundation, Inc. @@ -171,7 +171,7 @@ _prop_data_externalize(struct _prop_obje if (_prop_object_externalize_end_tag(ctx, "data") == false) return (false); - + return (true); } @@ -377,7 +377,7 @@ prop_data_copy_value(prop_data_t pd, voi if (! prop_object_is_data(pd)) return (false); - + if (buf == NULL || buflen < pd->pd_size) return (false); @@ -411,7 +411,7 @@ prop_data_data(prop_data_t pd) v = _PROP_MALLOC(pd->pd_size, M_TEMP); if (v != NULL) memcpy(v, pd->pd_immutable, pd->pd_size); - + return (v); } @@ -569,7 +569,7 @@ _prop_data_internalize_decode(struct _pr return (false); ch = (unsigned char) *src; /* FALLTHROUGH */ - + case 3: /* Valid, two bytes of info */ /* * We know this char is a =. Is there anything but @@ -662,7 +662,7 @@ _prop_data_internalize(prop_stack_t stac buf = _PROP_MALLOC(len + 1, M_PROP_DATA); if (buf == NULL) return (true); - + if (_prop_data_internalize_decode(ctx, buf, len + 1, &alen, &ctx->poic_cp) == false) { _PROP_FREE(buf, M_PROP_DATA); Index: src/common/lib/libprop/prop_dictionary.c diff -u src/common/lib/libprop/prop_dictionary.c:1.44 src/common/lib/libprop/prop_dictionary.c:1.45 --- src/common/lib/libprop/prop_dictionary.c:1.44 Sat Jul 2 16:30:13 2022 +++ src/common/lib/libprop/prop_dictionary.c Wed Aug 3 21:13:46 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: prop_dictionary.c,v 1.44 2022/07/02 16:30:13 andvar Exp $ */ +/* $NetBSD: prop_dictionary.c,v 1.45 2022/08/03 21:13:46 riastradh Exp $ */ /*- * Copyright (c) 2006, 2007, 2020 The NetBSD Foundation, Inc. @@ -133,7 +133,7 @@ static const struct _prop_object_type _p .pot_equals = _prop_dictionary_equals, .pot_equals_finish = _prop_dictionary_equals_finish, .pot_lock = _prop_dictionary_lock, - .pot_unlock = _prop_dicti
CVS commit: src/common/lib/libprop
Module Name:src Committed By: riastradh Date: Wed Aug 3 21:13:46 UTC 2022 Modified Files: src/common/lib/libprop: prop_array_util.c prop_data.c prop_dictionary.c prop_dictionary_util.c prop_kern.c prop_number.c prop_object.c prop_string.c Log Message: proplib: Nix trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/common/lib/libprop/prop_array_util.c \ src/common/lib/libprop/prop_dictionary_util.c cvs rdiff -u -r1.17 -r1.18 src/common/lib/libprop/prop_data.c cvs rdiff -u -r1.44 -r1.45 src/common/lib/libprop/prop_dictionary.c cvs rdiff -u -r1.24 -r1.25 src/common/lib/libprop/prop_kern.c cvs rdiff -u -r1.33 -r1.34 src/common/lib/libprop/prop_number.c cvs rdiff -u -r1.31 -r1.32 src/common/lib/libprop/prop_object.c cvs rdiff -u -r1.16 -r1.17 src/common/lib/libprop/prop_string.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libprop
Module Name:src Committed By: andvar Date: Sat Jul 2 16:30:13 UTC 2022 Modified Files: src/common/lib/libprop: prop_dictionary.c Log Message: s/refrences/references/ To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/common/lib/libprop/prop_dictionary.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libprop/prop_dictionary.c diff -u src/common/lib/libprop/prop_dictionary.c:1.43 src/common/lib/libprop/prop_dictionary.c:1.44 --- src/common/lib/libprop/prop_dictionary.c:1.43 Sun Dec 5 02:52:17 2021 +++ src/common/lib/libprop/prop_dictionary.c Sat Jul 2 16:30:13 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: prop_dictionary.c,v 1.43 2021/12/05 02:52:17 msaitoh Exp $ */ +/* $NetBSD: prop_dictionary.c,v 1.44 2022/07/02 16:30:13 andvar Exp $ */ /*- * Copyright (c) 2006, 2007, 2020 The NetBSD Foundation, Inc. @@ -689,7 +689,7 @@ prop_dictionary_create_with_capacity(uns * prop_dictionary_copy -- * Copy a dictionary. The new dictionary has an initial capacity equal * to the number of objects stored int the original dictionary. The new - * dictionary contains refrences to the original dictionary's objects, + * dictionary contains references to the original dictionary's objects, * not copies of those objects (i.e. a shallow copy). */ prop_dictionary_t
CVS commit: src/common/lib/libprop
Module Name:src Committed By: andvar Date: Sat Jul 2 16:30:13 UTC 2022 Modified Files: src/common/lib/libprop: prop_dictionary.c Log Message: s/refrences/references/ To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/common/lib/libprop/prop_dictionary.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/common/lib/libprop
On 12.06.2020 03:09, Joerg Sonnenberger wrote: > On Fri, Jun 12, 2020 at 02:59:40AM +0200, Kamil Rytarowski wrote: >> On 12.06.2020 02:07, Joerg Sonnenberger wrote: >>> On Fri, Jun 12, 2020 at 01:28:15AM +0200, Kamil Rytarowski wrote: Please list legitimate false positives. There is practically nothing like that possible for using deprecated APIs (at least kept longer term). Besides that, the report shall be lowered to warning (like it used to be for Clang). >>> >>> Build a random KDE package and see warnings about XHR symbols? >>> >>> Joerg >>> >> >> XDR? >> >> $ grep -ir xdr .|grep warn >> ./libc/yp/xdryp.c:__warn_references(xdr_domainname, >> ./libc/yp/xdryp.c:"warning: this program uses xdr_domainname(), >> which is deprecated and buggy.") >> ./libc/yp/xdryp.c:__warn_references(xdr_peername, >> ./libc/yp/xdryp.c:"warning: this program uses xdr_peername(), which >> is deprecated and buggy.") >> ./libc/yp/xdryp.c:__warn_references(xdr_mapname, >> ./libc/yp/xdryp.c:"warning: this program uses xdr_mapname(), which >> is deprecated and buggy.") >> >> KDE4? > > No, KDE5. > >> >> After grepping, I don't see relevant users of these APIs. There is >> something around Python that has a NIS/YP module. > > Exactly, nothing in Qt uses it, but it *still* triggers the warning. > My first suspect is python. Anyway it shall be a warning and problem solved. > Joerg > signature.asc Description: OpenPGP digital signature
Re: CVS commit: src/common/lib/libprop
On Fri, Jun 12, 2020 at 02:59:40AM +0200, Kamil Rytarowski wrote: > On 12.06.2020 02:07, Joerg Sonnenberger wrote: > > On Fri, Jun 12, 2020 at 01:28:15AM +0200, Kamil Rytarowski wrote: > >> Please list legitimate false positives. There is practically nothing > >> like that possible for using deprecated APIs (at least kept longer > >> term). Besides that, the report shall be lowered to warning (like it > >> used to be for Clang). > > > > Build a random KDE package and see warnings about XHR symbols? > > > > Joerg > > > > XDR? > > $ grep -ir xdr .|grep warn > ./libc/yp/xdryp.c:__warn_references(xdr_domainname, > ./libc/yp/xdryp.c:"warning: this program uses xdr_domainname(), > which is deprecated and buggy.") > ./libc/yp/xdryp.c:__warn_references(xdr_peername, > ./libc/yp/xdryp.c:"warning: this program uses xdr_peername(), which > is deprecated and buggy.") > ./libc/yp/xdryp.c:__warn_references(xdr_mapname, > ./libc/yp/xdryp.c:"warning: this program uses xdr_mapname(), which > is deprecated and buggy.") > > KDE4? No, KDE5. > > After grepping, I don't see relevant users of these APIs. There is > something around Python that has a NIS/YP module. Exactly, nothing in Qt uses it, but it *still* triggers the warning. Joerg
Re: CVS commit: src/common/lib/libprop
On 12.06.2020 02:07, Joerg Sonnenberger wrote: > On Fri, Jun 12, 2020 at 01:28:15AM +0200, Kamil Rytarowski wrote: >> Please list legitimate false positives. There is practically nothing >> like that possible for using deprecated APIs (at least kept longer >> term). Besides that, the report shall be lowered to warning (like it >> used to be for Clang). > > Build a random KDE package and see warnings about XHR symbols? > > Joerg > XDR? $ grep -ir xdr .|grep warn ./libc/yp/xdryp.c:__warn_references(xdr_domainname, ./libc/yp/xdryp.c:"warning: this program uses xdr_domainname(), which is deprecated and buggy.") ./libc/yp/xdryp.c:__warn_references(xdr_peername, ./libc/yp/xdryp.c:"warning: this program uses xdr_peername(), which is deprecated and buggy.") ./libc/yp/xdryp.c:__warn_references(xdr_mapname, ./libc/yp/xdryp.c:"warning: this program uses xdr_mapname(), which is deprecated and buggy.") KDE4? After grepping, I don't see relevant users of these APIs. There is something around Python that has a NIS/YP module. Even if this is the case, it shall be a warning (like it used to be). signature.asc Description: OpenPGP digital signature
Re: CVS commit: src/common/lib/libprop
On Fri, Jun 12, 2020 at 01:28:15AM +0200, Kamil Rytarowski wrote: > Please list legitimate false positives. There is practically nothing > like that possible for using deprecated APIs (at least kept longer > term). Besides that, the report shall be lowered to warning (like it > used to be for Clang). Build a random KDE package and see warnings about XHR symbols? Joerg
Re: CVS commit: src/common/lib/libprop
> On Jun 11, 2020, at 4:28 PM, Kamil Rytarowski wrote: > >> Repeating that statement doesn't make it true. The amount of legit >> problems found by them is dwarfed by far by the number of false >> positives seen. That's complete ignoring basic QoI issues like "where is >> this actually triggered" and no "I know, shut up". >> >> Joerg >> > > Please list legitimate false positives. There is practically nothing > like that possible for using deprecated APIs (at least kept longer > term). Besides that, the report shall be lowered to warning (like it > used to be for Clang). Like it or not, __warn_references() is the thing we do in the NetBSD source tree, and I have other reasons for not marking them deprecated in the headers for the moment. Clang can't cope, so I will change it so it's suppressed only for clang. -- thorpej
Re: CVS commit: src/common/lib/libprop
As Joerg mentioned, he believes that the error behavior is the way to go. I think that it is not useful behavior to error out on these warnings. If we wanted this behavior, we would not use linker warnings, we'd outright remove the deprecated symbols. christos > On Jun 11, 2020, at 6:58 PM, Kamil Rytarowski wrote: > > Signed PGP part > On 12.06.2020 00:55, Christos Zoulas wrote: >> In article <20200611222544.6d3a6f...@cvs.netbsd.org>, >> Joerg Sonnenberger wrote: >>> -=-=-=-=-=- >>> >>> Module Name:src >>> Committed By: joerg >>> Date: Thu Jun 11 22:25:44 UTC 2020 >>> >>> Modified Files: >>> src/common/lib/libprop: prop_object_impl.h >>> >>> Log Message: >>> Unbreak clang builds by removing questionable linker warning sections >>> trggered all over the place. >> >> Why don't you do this just for clang, so that we can use gcc to track the >> remaining ones down and finish the job? Now we can't easily find them. >> >> christos >> > > Can we please revert this and fix clang? > > I'm strongly for linker warnings as they catch real issues. > > > signature.asc Description: Message signed with OpenPGP
Re: CVS commit: src/common/lib/libprop
On 12.06.2020 01:11, Joerg Sonnenberger wrote: > On Fri, Jun 12, 2020 at 12:58:45AM +0200, Kamil Rytarowski wrote: >> On 12.06.2020 00:55, Christos Zoulas wrote: >>> In article <20200611222544.6d3a6f...@cvs.netbsd.org>, >>> Joerg Sonnenberger wrote: -=-=-=-=-=- Module Name: src Committed By: joerg Date: Thu Jun 11 22:25:44 UTC 2020 Modified Files: src/common/lib/libprop: prop_object_impl.h Log Message: Unbreak clang builds by removing questionable linker warning sections trggered all over the place. >>> >>> Why don't you do this just for clang, so that we can use gcc to track the >>> remaining ones down and finish the job? Now we can't easily find them. >>> >>> christos >>> >> >> Can we please revert this and fix clang? >> >> I'm strongly for linker warnings as they catch real issues. > > Repeating that statement doesn't make it true. The amount of legit > problems found by them is dwarfed by far by the number of false > positives seen. That's complete ignoring basic QoI issues like "where is > this actually triggered" and no "I know, shut up". > > Joerg > Please list legitimate false positives. There is practically nothing like that possible for using deprecated APIs (at least kept longer term). Besides that, the report shall be lowered to warning (like it used to be for Clang). signature.asc Description: OpenPGP digital signature
Re: CVS commit: src/common/lib/libprop
On Fri, Jun 12, 2020 at 12:58:45AM +0200, Kamil Rytarowski wrote: > On 12.06.2020 00:55, Christos Zoulas wrote: > > In article <20200611222544.6d3a6f...@cvs.netbsd.org>, > > Joerg Sonnenberger wrote: > >> -=-=-=-=-=- > >> > >> Module Name: src > >> Committed By: joerg > >> Date: Thu Jun 11 22:25:44 UTC 2020 > >> > >> Modified Files: > >>src/common/lib/libprop: prop_object_impl.h > >> > >> Log Message: > >> Unbreak clang builds by removing questionable linker warning sections > >> trggered all over the place. > > > > Why don't you do this just for clang, so that we can use gcc to track the > > remaining ones down and finish the job? Now we can't easily find them. > > > > christos > > > > Can we please revert this and fix clang? > > I'm strongly for linker warnings as they catch real issues. Repeating that statement doesn't make it true. The amount of legit problems found by them is dwarfed by far by the number of false positives seen. That's complete ignoring basic QoI issues like "where is this actually triggered" and no "I know, shut up". Joerg
Re: CVS commit: src/common/lib/libprop
On Thu, Jun 11, 2020 at 10:55:16PM -, Christos Zoulas wrote: > In article <20200611222544.6d3a6f...@cvs.netbsd.org>, > Joerg Sonnenberger wrote: > >-=-=-=-=-=- > > > >Module Name: src > >Committed By:joerg > >Date:Thu Jun 11 22:25:44 UTC 2020 > > > >Modified Files: > > src/common/lib/libprop: prop_object_impl.h > > > >Log Message: > >Unbreak clang builds by removing questionable linker warning sections > >trggered all over the place. > > Why don't you do this just for clang, so that we can use gcc to track the > remaining ones down and finish the job? Now we can't easily find them. Make them use the deprecation attribution and fix the fallout. But don't leave the build broken for days. I said it before, but the linker warning flags are a terrible way for handling deprecation. Look at many KDE builds for nice examples... Joerg
Re: CVS commit: src/common/lib/libprop
On 12.06.2020 00:55, Christos Zoulas wrote: > In article <20200611222544.6d3a6f...@cvs.netbsd.org>, > Joerg Sonnenberger wrote: >> -=-=-=-=-=- >> >> Module Name: src >> Committed By:joerg >> Date:Thu Jun 11 22:25:44 UTC 2020 >> >> Modified Files: >> src/common/lib/libprop: prop_object_impl.h >> >> Log Message: >> Unbreak clang builds by removing questionable linker warning sections >> trggered all over the place. > > Why don't you do this just for clang, so that we can use gcc to track the > remaining ones down and finish the job? Now we can't easily find them. > > christos > Can we please revert this and fix clang? I'm strongly for linker warnings as they catch real issues. signature.asc Description: OpenPGP digital signature
Re: CVS commit: src/common/lib/libprop
In article <20200611222544.6d3a6f...@cvs.netbsd.org>, Joerg Sonnenberger wrote: >-=-=-=-=-=- > >Module Name: src >Committed By: joerg >Date: Thu Jun 11 22:25:44 UTC 2020 > >Modified Files: > src/common/lib/libprop: prop_object_impl.h > >Log Message: >Unbreak clang builds by removing questionable linker warning sections >trggered all over the place. Why don't you do this just for clang, so that we can use gcc to track the remaining ones down and finish the job? Now we can't easily find them. christos
Re: CVS commit: src/common/lib/libprop
On Fri, Sep 05, 2014 at 05:19:25AM +, Matt Thomas wrote: > Modified Files: > src/common/lib/libprop: prop_ingest.c prop_number.c > > Log Message: > Eliminate use of C++ keywords and don't nest struct definitions. Why do we care if proppropliblib compiles in a C++ compiler? It is C code. -- David A. Holland dholl...@netbsd.org
Re: CVS commit: src/common/lib/libprop
On Wed, Apr 20, 2011 at 08:00:07PM +, Martin Husemann wrote: > Module Name: src > Committed By: martin > Date: Wed Apr 20 20:00:07 UTC 2011 > > Modified Files: > src/common/lib/libprop: prop_object.c > > Log Message: > Update also the non-void pointers to the current test objects. > Finaly fixes PR lib/43964. Thanks! Dave -- David Young OJC Technologies dyo...@ojctech.com Urbana, IL * (217) 344-0444 x24
Re: CVS commit: src/common/lib/libprop
On Mon, Dec 14, 2009 at 05:47:30AM +, David A. Holland wrote: > Log Message: > Minor wording fix/clarification (sending -> copying) from Silas Silva > in PR 42415. That's 42414. I fixed all the resulting loose bits. -- David A. Holland dholl...@netbsd.org
Re: CVS commit: src/common/lib/libprop
On Tue, Apr 14, 2009 at 02:53:41AM +, Adam Hamsik wrote: > Log Message: > Check if pd is not NULL before we try to lock rw lock associated with it. > This fixes proplib crash when NULL is passed to prop_dictionary_get as a > dictionary. Why is that valid operation? Joerg