* warnings in win32 builds from trunk
@ 2022-04-02 23:33 Corwin Brust
2022-04-03 6:17 ` Eli Zaretskii
0 siblings, 1 reply; 3+ messages in thread
From: Corwin Brust @ 2022-04-02 23:33 UTC (permalink / raw)
To: Emacs developers
Attempting to build a snapshot from the master branch today I noticed
some warnings. Here they are; please let me know if there's else I
might helpfully do to troubleshoot/debug these (e.g. open a bug
report).
Maybe easier to read:
https://bpa.st/6EBA
Inline (to EOM):
CC w32notify.o
In file included from C:/Users/corwi/emacs-build/git/master/src/process.c:33:
C:/Users/corwi/emacs-build/git/master/src/process.c: In function
'Fmake_process':
C:/Users/corwi/emacs-build/git/master/src/lisp.h:1649:31: warning:
null pointer dereference [-Wnull-dereference]
1649 | return XSTRING (string)->u.s.data;
| ~~~~~~~~~~~~~~~~~~~~~^~~~~
CC profiler.o
CC decompress.o
CC thread.o
CC systhread.o
CC sqlite.o
CC hbfont.o
CC w32fns.o
CC w32menu.o
CC w32reg.o
CC w32font.o
CC w32term.o
CC w32xfns.o
CC w32select.o
CC w32uniscribe.o
CC w32cygwinx.o
CC w32.o
CC w32console.o
CC w32heap.o
CC w32inevt.o
CC w32proc.o
CC w32image.o
CC fontset.o
CC fringe.o
CC image.o
C:/Users/corwi/emacs-build/git/master/src/w32menu.c: In function
'set_frame_menubar':
C:/Users/corwi/emacs-build/git/master/src/w32menu.c:324:9: warning:
'memcpy' offset [3, 10] from the object at '<unknown>' is out of the
bounds of referenced subobject 'contents' with type 'struct Lisp_X
*[]' at offset 3 [-Warray-bounds]
324 | memcpy (previous_items, XVECTOR (f->menu_bar_vector)->contents,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
325 | previous_menu_items_used * word_size);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/Users/corwi/emacs-build/git/master/src/w32menu.c:26:
C:/Users/corwi/emacs-build/git/master/src/lisp.h:1725:17: note:
subobject 'contents' declared here
1725 | Lisp_Object contents[FLEXIBLE_ARRAY_MEMBER];
| ^~~~~~~~
C:/Users/corwi/emacs-build/git/master/src/w32heap.c: In function 'getrlimit':
C:/Users/corwi/emacs-build/git/master/src/w32heap.c:853:14: warning:
'm' may be used uninitialized [-Wmaybe-uninitialized]
853 | if (!VirtualQuery ((LPCVOID) &m, &m, sizeof m))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/msys2/mingw64/x86_64-w64-mingw32/include/winbase.h:25,
from C:/msys2/mingw64/x86_64-w64-mingw32/include/windows.h:70,
from C:/Users/corwi/emacs-build/git/master/src/w32common.h:24,
from C:/Users/corwi/emacs-build/git/master/src/w32heap.c:54:
C:/msys2/mingw64/x86_64-w64-mingw32/include/memoryapi.h:45:28: note:
by argument 1 of type 'LPCVOID' {aka 'const void *'} to 'VirtualQuery'
declared here
45 | WINBASEAPI SIZE_T WINAPI VirtualQuery (LPCVOID lpAddress,
PMEMORY_BASIC_INFORMATION lpBuffer, SIZE_T dwLength);
| ^~~~~~~~~~~~
C:/Users/corwi/emacs-build/git/master/src/w32heap.c:844:34: note: 'm'
declared here
844 | MEMORY_BASIC_INFORMATION m;
| ^
CC json.o
CC tparam.o
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: warnings in win32 builds from trunk
2022-04-02 23:33 warnings in win32 builds from trunk Corwin Brust
@ 2022-04-03 6:17 ` Eli Zaretskii
2022-04-03 16:30 ` Corwin Brust
0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2022-04-03 6:17 UTC (permalink / raw)
To: Corwin Brust; +Cc: emacs-devel
> From: Corwin Brust <corwin@bru.st>
> Date: Sat, 2 Apr 2022 18:33:27 -0500
>
> Attempting to build a snapshot from the master branch today I noticed
> some warnings. Here they are; please let me know if there's else I
> might helpfully do to troubleshoot/debug these (e.g. open a bug
> report).
Please file a bug report for each one of them.
> In file included from C:/Users/corwi/emacs-build/git/master/src/process.c:33:
> C:/Users/corwi/emacs-build/git/master/src/process.c: In function
> 'Fmake_process':
> C:/Users/corwi/emacs-build/git/master/src/lisp.h:1649:31: warning:
> null pointer dereference [-Wnull-dereference]
> 1649 | return XSTRING (string)->u.s.data;
> | ~~~~~~~~~~~~~~~~~~~~~^~~~~
Line 1649 of lisp.h is inside SDATA. But since Fmake_process doesn't
call SDATA directly, I don't know which string object is this about.
(Really, the compiler should do a better job when reporting such
issues, by showing all the relevant source locations.)
> C:/Users/corwi/emacs-build/git/master/src/w32menu.c: In function
> 'set_frame_menubar':
> C:/Users/corwi/emacs-build/git/master/src/w32menu.c:324:9: warning:
> 'memcpy' offset [3, 10] from the object at '<unknown>' is out of the
> bounds of referenced subobject 'contents' with type 'struct Lisp_X
> *[]' at offset 3 [-Warray-bounds]
> 324 | memcpy (previous_items, XVECTOR (f->menu_bar_vector)->contents,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 325 | previous_menu_items_used * word_size);
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from C:/Users/corwi/emacs-build/git/master/src/w32menu.c:26:
> C:/Users/corwi/emacs-build/git/master/src/lisp.h:1725:17: note:
> subobject 'contents' declared here
> 1725 | Lisp_Object contents[FLEXIBLE_ARRAY_MEMBER];
> | ^~~~~~~~
This is some general problem with FLEXIBLE_ARRAY_MEMBER, not specific
to w32. Sounds like latest compilers don't like that. Are you
building with custom compiler switches, per chance?
> C:/Users/corwi/emacs-build/git/master/src/w32heap.c: In function 'getrlimit':
> C:/Users/corwi/emacs-build/git/master/src/w32heap.c:853:14: warning:
> 'm' may be used uninitialized [-Wmaybe-uninitialized]
> 853 | if (!VirtualQuery ((LPCVOID) &m, &m, sizeof m))
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is a bogus warning, ignore it. The compiler doesn't understand
the semantics of VirtualQuery.
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: warnings in win32 builds from trunk
2022-04-03 6:17 ` Eli Zaretskii
@ 2022-04-03 16:30 ` Corwin Brust
0 siblings, 0 replies; 3+ messages in thread
From: Corwin Brust @ 2022-04-03 16:30 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Emacs developers
On Sun, Apr 3, 2022 at 1:17 AM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Corwin Brust <corwin@bru.st>
> > Date: Sat, 2 Apr 2022 18:33:27 -0500
> >
> > Attempting to build a snapshot from the master branch today I noticed
> > some warnings. Here they are; please let me know if there's else I
> > might helpfully do to troubleshoot/debug these (e.g. open a bug
> > report).
>
> Please file a bug report for each one of them.
Now done (except for the one you indicated should be ignored).
Replying here also in case that's helpful for posterity; see detail below.
>
> > In file included from C:/Users/corwi/emacs-build/git/master/src/process.c:33:
> > C:/Users/corwi/emacs-build/git/master/src/process.c: In function
> > 'Fmake_process':
> > C:/Users/corwi/emacs-build/git/master/src/lisp.h:1649:31: warning:
> > null pointer dereference [-Wnull-dereference]
> > 1649 | return XSTRING (string)->u.s.data;
> > | ~~~~~~~~~~~~~~~~~~~~~^~~~~
>
> Line 1649 of lisp.h is inside SDATA. But since Fmake_process doesn't
> call SDATA directly, I don't know which string object is this about.
> (Really, the compiler should do a better job when reporting such
> issues, by showing all the relevant source locations.)
bug#54695: 29.0.50; w32notify.o Fmake_process warning building on win32
>
> > C:/Users/corwi/emacs-build/git/master/src/w32menu.c: In function
> > 'set_frame_menubar':
> > C:/Users/corwi/emacs-build/git/master/src/w32menu.c:324:9: warning:
> > 'memcpy' offset [3, 10] from the object at '<unknown>' is out of the
> > bounds of referenced subobject 'contents' with type 'struct Lisp_X
> > *[]' at offset 3 [-Warray-bounds]
> > 324 | memcpy (previous_items, XVECTOR (f->menu_bar_vector)->contents,
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > 325 | previous_menu_items_used * word_size);
> > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > In file included from C:/Users/corwi/emacs-build/git/master/src/w32menu.c:26:
> > C:/Users/corwi/emacs-build/git/master/src/lisp.h:1725:17: note:
> > subobject 'contents' declared here
> > 1725 | Lisp_Object contents[FLEXIBLE_ARRAY_MEMBER];
> > | ^~~~~~~~
>
> This is some general problem with FLEXIBLE_ARRAY_MEMBER, not specific
> to w32. Sounds like latest compilers don't like that. Are you
> building with custom compiler switches, per chance?
bug#54694: 29.0.50; w32menu.o set_frame_menubar warning building on win32
I don't think I am building with any custom compiler switches.
Configured using:
'configure --without-dbus --with-native-compilation
--without-compress-install -C 'CFLAGS=-O2 -g3''
Configured features:
ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP
NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS WEBP XPM ZLIB
>
> > C:/Users/corwi/emacs-build/git/master/src/w32heap.c: In function 'getrlimit':
> > C:/Users/corwi/emacs-build/git/master/src/w32heap.c:853:14: warning:
> > 'm' may be used uninitialized [-Wmaybe-uninitialized]
> > 853 | if (!VirtualQuery ((LPCVOID) &m, &m, sizeof m))
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> This is a bogus warning, ignore it. The compiler doesn't understand
> the semantics of VirtualQuery.
So I didn't create a bug report for this one. Please LMK if it's
helpful for me to do so.
>
> Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-03 16:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-02 23:33 warnings in win32 builds from trunk Corwin Brust
2022-04-03 6:17 ` Eli Zaretskii
2022-04-03 16:30 ` Corwin Brust
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.