similar to: [PATCH nbdkit] server/public.c: Uninline nbdkit_strdup_intern to avoid compiler warning.

Displaying 20 results from an estimated 900 matches similar to: "[PATCH nbdkit] server/public.c: Uninline nbdkit_strdup_intern to avoid compiler warning."

2020 Sep 03
1
Re: [PATCH nbdkit] server/public.c: Uninline nbdkit_strdup_intern to avoid compiler warning.
On 9/3/20 4:41 AM, Richard W.M. Jones wrote: > Previously with GCC 10.2 this code produced: > > In function ‘nbdkit_strndup_intern’, > inlined from ‘nbdkit_strdup_intern’ at public.c:839:10: > public.c:827:10: error: ‘strndup’ specified bound 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=] > 827 | copy = strndup (str,
2020 Sep 03
2
Re: [PATCH nbdkit] server/public.c: Uninline nbdkit_strdup_intern to avoid compiler warning.
On Thu, Sep 03, 2020 at 10:47:13AM +0100, Richard W.M. Jones wrote: > > A simple reproducer is: > > ---------------------------------------------------------------------- > #include <stdio.h> > #include <stdlib.h> > #include <stdint.h> > #include <string.h> > > const char * > copyn (const char *str, size_t n) > { > return strndup
2020 Sep 03
0
Re: [PATCH nbdkit] server/public.c: Uninline nbdkit_strdup_intern to avoid compiler warning.
A simple reproducer is: ---------------------------------------------------------------------- #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <string.h> const char * copyn (const char *str, size_t n) { return strndup (str, n); } const char * copy (const char *str) { return copyn (str, SIZE_MAX); }
2020 Sep 03
0
[PATCH nbdkit] server/public.c: Uninline nbdkit_strdup_intern to avoid compiler warning.
Previously with GCC 10.2 this code produced: In function ‘nbdkit_strndup_intern’, inlined from ‘nbdkit_strdup_intern’ at public.c:839:10: public.c:827:10: error: ‘strndup’ specified bound 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=] 827 | copy = strndup (str, n); | ^~~~~~~~~~~~~~~~ --- server/public.c | 16
2020 Aug 26
2
Re: [nbdkit PATCH 3/5] api: Add nbdkit_string_intern helper
On 8/25/20 3:32 PM, Eric Blake wrote: >>> -      keys[optind] = strndup (argv[optind], n); >>> -      if (keys[optind] == NULL) { >>> -        perror ("strndup"); >>> +      CLEANUP_FREE char *key = strndup (argv[optind], n); >>> +      const char *safekey = nbdkit_string_intern (key); >>> +      if (safekey == NULL) >>>
2020 Sep 03
0
Re: [PATCH nbdkit] server/public.c: Uninline nbdkit_strdup_intern to avoid compiler warning.
Filed upstream as: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96916 Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW
2020 Aug 25
3
Re: [nbdkit PATCH 3/5] api: Add nbdkit_string_intern helper
On Tue, Aug 25, 2020 at 10:46:57AM -0500, Eric Blake wrote: > + const char *nbdkit_string_intern (const char *str); > + > +Returns a copy of str, so that the caller may reclaim str and use the > +copy in its place. If the copy is created outside the scope of a > +connection (such as during C<.load>), the lifetime of the copy will > +last at least through C<.unload>;
2020 Aug 27
10
[nbdkit PATCH v2 0/8] exportname filter
This is a revision of my .default_export work, plus new work on .export_descriptions and a new exportname filter. I think it is now ready to check in. Things I'd still like in 1.22: - the file plugin should implement .list_exports (patch already posted, but it needs rebasing on this series) - the ext2 filter should override .list_exports when in exportname mode - the nbd plugin should be
2020 Aug 27
0
[nbdkit PATCH v2 4/8] api: Add nbdkit_str[n]dup_intern helper
Implementing .default_export with its 'const char *' return is tricky in the sh plugin: we must return dynamic memory, but must avoid a use-after-free. And we don't want to change the return type of .default_export to 'char *', because that would make our choice of malloc()/free() part of the API, preventing either nbdkit or a plugin from experimenting with an alternate
2020 Aug 27
4
[nbdkit PATCH 0/2] ext2 export list tweaks
Applies on top of my pending series for the exportname filter, addressing one of the todo's in that cover letter. Eric Blake (2): filters: Add .export_description wrappers ext2: Supply .list_exports and .default_export filters/ext2/nbdkit-ext2-filter.pod | 3 +- tests/Makefile.am | 16 +++- filters/ext2/ext2.c | 125 +++++++++++++++++++---------
2022 Nov 27
1
[PATCH] drm/nouveau/disp: Fix nvif_outp_acquire_dp() argument size
Both Coverity and GCC with -Wstringop-overflow noticed that nvif_outp_acquire_dp() accidentally defined its second argument with 1 additional element: drivers/gpu/drm/nouveau/dispnv50/disp.c: In function 'nv50_pior_atomic_enable': drivers/gpu/drm/nouveau/dispnv50/disp.c:1813:17: error: 'nvif_outp_acquire_dp' accessing 16 bytes in a region of size 15 [-Werror=stringop-overflow=]
2020 Sep 01
4
[nbdkit PATCH 0/2] More language bindings for .list_exports
This picks up python and ocaml. Some of our languages are lacking a number of bindings (for example, lua and perl lack .extents, so I didn't have anything to copy from), and I felt less comfortable with golang and rust. But for python and ocaml, I was able to test a working implementation. Eric Blake (2): python: Implement .list_exports and friends ocaml: Implement .list_exports and
2023 Jan 25
1
[PATCH] drm/nouveau/disp: Fix nvif_outp_acquire_dp() argument size
Sorry! I've been pretty busy until now, this is: Reviewed-by: Lyude Paul <lyude at redhat.com> Let me know if you've pushed it already or if you want me to push it to drm- misc On Wed, 2023-01-25 at 12:15 -0800, Kees Cook wrote: > Ping. I'll take this via my tree unless someone else wants to take it... > > On Sun, Nov 27, 2022 at 10:30:41AM -0800, Kees Cook wrote:
2020 Sep 21
18
[nbdkit PATCH v3 00/14] exportname filter
It's been several weeks since I posted v2 (I got distracted by improving libnbd to better test things, which in turn surfaced some major memory leak problems in nbdsh that are now fixed). Many of the patches are minor rebases from v2, with the biggest changes being fallout from: - patch 2: rename nbdkit_add_default_export to nbdkit_use_default_export - overall: this missed 1.22, so update
2020 Aug 26
0
Re: [nbdkit PATCH 3/5] api: Add nbdkit_string_intern helper
On Wed, Aug 26, 2020 at 08:33:39AM -0500, Eric Blake wrote: > On 8/25/20 3:32 PM, Eric Blake wrote: > > >>>-      keys[optind] = strndup (argv[optind], n); > >>>-      if (keys[optind] == NULL) { > >>>-        perror ("strndup"); > >>>+      CLEANUP_FREE char *key = strndup (argv[optind], n); > >>>+      const char
2020 May 22
2
GCC warning
I am trying to submit a package on CRAN, and everything passes ok on all platforms but Debian, where CRAN responds with an automatic "significant" warning: * checking whether package ?QCA? can be installed ... [35s/35s] WARNING Found the following significant warnings: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ?__builtin_strncpy? output may be truncated
2020 Sep 25
2
Re: Help on Meson build Error
On Thu, Sep 24, 2020 at 2:58 PM Ján Tomko <jtomko@redhat.com> wrote: > On a Thursday in 2020, Wei Wang wrote: > >Seems it didn't appear on the mailing list, resent it. > > > > Hi folks, > > > >I'm trying to build libvirt using meson with the latest upstream libvirt, > >but the compilation fails: > >(followed on
2020 Feb 18
1
install_prereq install-unpackaged fails on Debian Buster
Hello, For the very first time, I tried the command bellow on a newly build Debian Buster box on which I successfully built Asterisk 17.2.0 before. I got : # contrib/scripts/install_prereq install-unpackaged *** Installing NBS (Network Broadcast Sound) *** A nbs-trunk/LICENSE A nbs-trunk/nbsclient.c A nbs-trunk/nbsd.c A nbs-trunk/nbs.h A nbs-trunk/nbscat.c A nbs-trunk/Makefile
2020 Aug 28
4
[nbdkit PATCH 0/3] .list_exports in nbd plugin
Another series on top of my exportname filter, marking off another todo bullet point. With this, you can now use the NBD plugin as a transparent passthrough of all export names served by the remote server in both directions (list advertisement server to client, and export name from client to server). Eric Blake (3): nbd: Implement .default_export, .export_description nbd: Add
2006 Jul 26
5
[Fwd: stack overflow "cause" found]
Xen is compiled with no -O gcc option, meaning no optimization, and the compiler does the safest thing imaginable. This means that if a function, say vmx_world_save(), calls the same inline a bazillion times, the stack will have one block of local variables for each invocation of that function! Xen really should not be doing this. We could either uninline some of these functions, or try gcc -O2