Ticket #4572 (closed task: fixed)

Opened 6 months ago

Last modified 4 weeks ago

Prepare for release mc-4.8.33

Reported by: zaytsev Owned by: zaytsev
Priority: major Milestone: 4.8.33
Component: adm Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description


Attachments

0001-buildsys-remove-orphaned-rpc-checks-after-samba-was-.patch (1.4 KB) - added by zaytsev 5 months ago.
0001-fix-typo-in-mc.emacs.keymap.patch (662 bytes) - added by krekhov 4 months ago.
mc-4572-sparse.c-fix-Wunused-macros-warning.patch (1003 bytes) - added by and 3 months ago.
mc-4572-tar-internal.c-fix-Wunused-macros-warning.patch (813 bytes) - added by and 3 months ago.
mc-4572-usermenu.c-fix-Wunused-macros-warning.patch (828 bytes) - added by and 3 months ago.
mc-4572-widget-common.c-fix-Wanalyzer-deref-before-check-war.patch (2.8 KB) - added by and 3 months ago.
mc-4572-Cleanup-cppcheck-warnings.patch (1.7 KB) - added by and 2 months ago.
mc-4572-fix-Glib-g_string_free-assertion.patch (1.0 KB) - added by and 2 months ago.
mc-4572-ftpfs.c-fix-error-handling.patch (1.1 KB) - added by and 2 months ago.
mc-4572-fix-garbage-return-value-message.patch (1.5 KB) - added by and 2 months ago.
mc-4572-quick_c-fix-undefined-behaviour.patch (3.8 KB) - added by and 2 months ago.
mc-4572-boxes_c-fix-uninitialized-value-function-call.patch (992 bytes) - added by and 2 months ago.
mc-4572-editcmd_c-fix-uninitialized-value-function-call.patch (1.5 KB) - added by and 2 months ago.
mc-4572-editsearch_c-fix-uninitialized-value-and-null-pointer-dereference.patch (1.6 KB) - added by and 2 months ago.
mc-4572-listbox_c-fix-division-by-zero-warning.patch (1017 bytes) - added by and 2 months ago.
mc-4572-quick_c-fix-memory-leak.patch (881 bytes) - added by and 2 months ago.
mc-4572-util_c-fix-undefined-binary-operator-result.patch (1.7 KB) - added by and 2 months ago.

Change History

comment:1 Changed 6 months ago by zaytsev

comment:2 Changed 5 months ago by andrew_b

Applied.

comment:3 Changed 5 months ago by zaytsev

Clang reports:

../../../src/filemanager/mountlist.c:1218:3: warning: unused label 'free_then_fail' [-Wunused-label]
 1218 |   free_then_fail:
      |   ^~~~~~~~~~~~~~~

Do I understand correctly that it doesn't make sense to fix it, because this code is copied from elsewhere and will be overwritten upon the next sync?

comment:4 Changed 5 months ago by zaytsev

Also tar stuff produces a lot of warnings:

  CC       tar-internal.lo
../../../../src/vfs/tar/tar-internal.c:403:47: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  403 |     return tar_from_header (p, s, "off_t", 0, TYPE_MAXIMUM (off_t), FALSE);
      |                                               ^~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:64:35: note: expanded from macro 'TYPE_MAXIMUM'
   64 | #define TYPE_MAXIMUM(t) (~(t) 0 - TYPE_MINIMUM (t))
      |                                   ^~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
1 warning generated.
  CC       tar-sparse.lo
../../../../src/vfs/tar/tar-sparse.c:703:40: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  703 |             if (!decode_num (&u, nbuf, TYPE_MAXIMUM (off_t)))
      |                                        ^~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:64:35: note: expanded from macro 'TYPE_MAXIMUM'
   64 | #define TYPE_MAXIMUM(t) (~(t) 0 - TYPE_MINIMUM (t))
      |                                   ^~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar-sparse.c:710:66: warning: comparison of integers of different signs: 'off_t' (aka 'long long') and 'unsigned long long' [-Wsign-compare]
  710 |             if (!decode_num (&u, nbuf, TYPE_MAXIMUM (size_t)) || INT_ADD_OVERFLOW (sp.offset, u)
      |                                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-sparse.c:193:35: note: expanded from macro 'INT_ADD_OVERFLOW'
  193 |     _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW)
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-sparse.c:134:3: note: expanded from macro '_GL_BINARY_OP_OVERFLOW'
  134 |   op_result_overflow (a, b,                                             \
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  135 |                       _GL_INT_MINIMUM (_GL_INT_CONVERT (a, b)),         \
      |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  136 |                       _GL_INT_MAXIMUM (_GL_INT_CONVERT (a, b)))
      |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-sparse.c:169:21: note: expanded from macro '_GL_ADD_OVERFLOW'
  169 |     : (b) < 0 ? (a) <= (a) + (b)                                        \
      |                  ~  ^  ~~~~~~~~~
2 warnings generated.
  CC       tar-xheader.lo
../../../../src/vfs/tar/tar-xheader.c:313:16: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  313 |     time_t s = TYPE_MINIMUM (time_t);
      |                ^~~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar-xheader.c:330:40: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  330 |             if (TYPE_SIGNED (time_t) ? TYPE_MINIMUM (time_t) <= i : 0 <= i)
      |                                        ^~~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar-xheader.c:340:22: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  340 |             if (i <= TYPE_MAXIMUM (time_t))
      |                      ^~~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:64:35: note: expanded from macro 'TYPE_MAXIMUM'
   64 | #define TYPE_MAXIMUM(t) (~(t) 0 - TYPE_MINIMUM (t))
      |                                   ^~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar-xheader.c:378:30: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  378 |                     if (s == TYPE_MINIMUM (time_t))
      |                              ^~~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar-xheader.c:330:69: warning: code will never be executed [-Wunreachable-code]
  330 |             if (TYPE_SIGNED (time_t) ? TYPE_MINIMUM (time_t) <= i : 0 <= i)
      |                                                                     ^
../../../../src/vfs/tar/tar-xheader.c:604:31: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  604 |     if (!decode_num (&u, arg, TYPE_MAXIMUM (off_t), keyword))
      |                               ^~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:64:35: note: expanded from macro 'TYPE_MAXIMUM'
   64 | #define TYPE_MAXIMUM(t) (~(t) 0 - TYPE_MINIMUM (t))
      |                                   ^~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar-xheader.c:807:31: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  807 |     if (!decode_num (&u, arg, TYPE_MAXIMUM (off_t), keyword))
      |                               ^~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:64:35: note: expanded from macro 'TYPE_MAXIMUM'
   64 | #define TYPE_MAXIMUM(t) (~(t) 0 - TYPE_MINIMUM (t))
      |                                   ^~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar-xheader.c:846:31: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  846 |     if (!decode_num (&u, arg, TYPE_MAXIMUM (off_t), keyword))
      |                               ^~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:64:35: note: expanded from macro 'TYPE_MAXIMUM'
   64 | #define TYPE_MAXIMUM(t) (~(t) 0 - TYPE_MINIMUM (t))
      |                                   ^~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar-xheader.c:901:13: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  901 |         if (TYPE_MAXIMUM (off_t) < u)
      |             ^~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:64:35: note: expanded from macro 'TYPE_MAXIMUM'
   64 | #define TYPE_MAXIMUM(t) (~(t) 0 - TYPE_MINIMUM (t))
      |                                   ^~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar-xheader.c:903:17: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  903 |             u = TYPE_MAXIMUM (off_t);
      |                 ^~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:64:35: note: expanded from macro 'TYPE_MAXIMUM'
   64 | #define TYPE_MAXIMUM(t) (~(t) 0 - TYPE_MINIMUM (t))
      |                                   ^~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
10 warnings generated.
  CC       tar.lo
../../../../src/vfs/tar/tar.c:185:46: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  185 |     return tar_from_header (p, s, "major_t", TYPE_MINIMUM (major_t), TYPE_MAXIMUM (major_t), FALSE);
      |                                              ^~~~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar.c:185:70: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  185 |     return tar_from_header (p, s, "major_t", TYPE_MINIMUM (major_t), TYPE_MAXIMUM (major_t), FALSE);
      |                                                                      ^~~~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:64:35: note: expanded from macro 'TYPE_MAXIMUM'
   64 | #define TYPE_MAXIMUM(t) (~(t) 0 - TYPE_MINIMUM (t))
      |                                   ^~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar.c:193:46: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  193 |     return tar_from_header (p, s, "minor_t", TYPE_MINIMUM (minor_t), TYPE_MAXIMUM (minor_t), FALSE);
      |                                              ^~~~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar.c:193:70: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  193 |     return tar_from_header (p, s, "minor_t", TYPE_MINIMUM (minor_t), TYPE_MAXIMUM (minor_t), FALSE);
      |                                                                      ^~~~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:64:35: note: expanded from macro 'TYPE_MAXIMUM'
   64 | #define TYPE_MAXIMUM(t) (~(t) 0 - TYPE_MINIMUM (t))
      |                                   ^~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar.c:238:45: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  238 |     return tar_from_header (p, s, "time_t", TYPE_MINIMUM (time_t), TYPE_MAXIMUM (time_t), FALSE);
      |                                             ^~~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
../../../../src/vfs/tar/tar.c:238:68: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
  238 |     return tar_from_header (p, s, "time_t", TYPE_MINIMUM (time_t), TYPE_MAXIMUM (time_t), FALSE);
      |                                                                    ^~~~~~~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:64:35: note: expanded from macro 'TYPE_MAXIMUM'
   64 | #define TYPE_MAXIMUM(t) (~(t) 0 - TYPE_MINIMUM (t))
      |                                   ^~~~~~~~~~~~~~~~
../../../../src/vfs/tar/tar-internal.h:63:51: note: expanded from macro 'TYPE_MINIMUM'
   63 | #define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~(t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
      |                                            ~~~~~~ ^
6 warnings generated.

comment:5 Changed 5 months ago by andrew_b

Code of mountlist and tar is copied from gnulib.

comment:6 Changed 5 months ago by andrew_b

  • Version set to master
  • Branch state changed from no branch to on review

Branch has been rebased to recent master.
Initial changeset:8fc494fa63d65643c57be6f75cc7d466c3418324

comment:7 Changed 5 months ago by zaytsev

  • Votes for changeset set to zaytsev
  • Branch state changed from on review to approved

I'm not sure it's worth it updating the PO-files. I would rather not do it, if we are to reformat at some point. I've looked at the changes and could not find anything suspicious. I'm not a big expert though...

comment:8 Changed 5 months ago by andrew_b

  • Votes for changeset changed from zaytsev to committed-master
  • Branch state changed from approved to merged

Merged to master: [f46406473edd12debcd6b46361d518979329d528].

git log --oneline a24d45ffa..f46406473

comment:9 Changed 5 months ago by andrew_b

  • Votes for changeset committed-master deleted
  • Branch state changed from merged to no branch

comment:10 Changed 4 months ago by krekhov

Hi, I'm from the ticket: https://midnight-commander.org/ticket/4602
I am attaching my small patch here (0001-fix-typo-in-mc.emacs.keymap.patch).
Thank you.

Changed 4 months ago by krekhov

comment:11 Changed 4 months ago by andrew_b

Last edited 2 months ago by andrew_b (previous) (diff)

comment:12 Changed 4 months ago by zaytsev

Rebased on master so that this branch gets CI.

comment:13 Changed 3 months ago by andrew_b

Thanks!

mc-4572-sparse.c-fix-Wunused-macros-warning.patch​:
mc-4572-tar-internal.c-fix-Wunused-macros-warning.patch​:
mc-4572-usermenu.c-fix-Wunused-macros-warning.patch: these three patches are united to single commit.

mc-4572-widget-common.c-fix-Wanalyzer-deref-before-check-war.patch​: applied.

Changed 2 months ago by and

comment:14 Changed 2 months ago by andrew_b

mc-4572-Cleanup-cppcheck-warnings.patch​: applied.

Branch rebased to current master with resolution of various conflicts.

Changed 2 months ago by and

Changed 2 months ago by and

comment:15 Changed 2 months ago by andrew_b

mc-4572-fix-Glib-g_string_free-assertion.patch​: applied.
mc-4572-ftpfs.c-fix-error-handling.patch​: not sure. Probably, errno of connect() is meant there. So the patch is following:

  • src/vfs/ftpfs/ftpfs.c

    index 6eb9c2aaf..a9f807e35 100644
    a b ftpfs_open_socket (struct vfs_class *me, struct vfs_s_super *super) 
    935935        me->verrno = errno; 
    936936        close (my_socket); 
    937937 
    938         if (errno == EINTR && tty_got_interrupt ()) 
     938        if (me->verrno == EINTR && tty_got_interrupt ()) 
    939939            vfs_print_message ("%s", _("ftpfs: connection interrupted by user")); 
    940940        else if (res->ai_next == NULL) 
    941941            vfs_print_message (_("ftpfs: connection to server failed: %s"), 
Last edited 2 months ago by andrew_b (previous) (diff)

comment:16 Changed 2 months ago by and

Yes, you're right.
me->verrno aka errno from previous connect() function should test against EINTR

Last edited 2 months ago by and (previous) (diff)

Changed 2 months ago by and

comment:17 Changed 2 months ago by andrew_b

mc-4572-fix-garbage-return-value-message.patch​: applied.
Thanks!

Changed 2 months ago by and

comment:18 Changed 2 months ago by andrew_b

mc-4572-quick_c-fix-undefined-behaviour.patch​: applied.
Thanks!

Changed 2 months ago by and

comment:19 Changed 2 months ago by andrew_b

Thanks!

mc-4572-boxes_c-fix-uninitialized-value-function-call.patch​: applied.
mc-4572-editcmd_c-fix-uninitialized-value-function-call.patch​: applied.
mc-4572-editsearch_c-fix-uninitialized-value-and-null-pointer-dereference.patch​: applied.
mc-4572-listbox_c-fix-division-by-zero-warning.patch​: applied another fix.
mc-4572-quick_c-fix-memory-leak.patch​: applied.
mc-4572-util_c-fix-undefined-binary-operator-result.patch​: applied another fix.

comment:20 Changed 6 weeks ago by zaytsev

Question whether to revert my last commit and re-adjust uc1541 instead in #3100, also:

zaytsev@Mac-80 helpers % git diff
diff --git a/configure.ac b/configure.ac
index 36ad8362e..e7adf5ea9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -356,17 +356,9 @@ AC_CHECK_DECLS([environ], , ,
   [ #include <unistd.h>
     #include <stdlib.h> ])
 
-case $host_os in
-*os400)
-    AC_PATH_PROG([PERL], [perl], [/QOpenSys/pkgs/bin/perl])
-    AC_PATH_PROG([PERL_FOR_BUILD], [perl], [/QOpenSys/pkgs/bin/perl])
-    AC_PATH_PROG([RUBY], [ruby], [/QOpenSys/pkgs/bin/ruby])
-    ;;
-*)
-    AC_PATH_PROG([PERL], [perl], [/usr/bin/perl])
-    AC_PATH_PROG([PERL_FOR_BUILD], [perl], [/usr/bin/perl])
-    AC_PATH_PROG([RUBY], [ruby], [/usr/bin/ruby])
-esac
+AC_PATH_PROG([PERL], [perl], [/usr/bin/perl], [$PATH$PATH_SEPARATOR/QOpenSys/pkgs/bin])
+AC_PATH_PROG([PERL_FOR_BUILD], [perl], [/usr/bin/perl], [$PATH$PATH_SEPARATOR/QOpenSys/pkgs/bin])
+AC_PATH_PROG([RUBY], [ruby], [/usr/bin/ruby], [$PATH$PATH_SEPARATOR/QOpenSys/pkgs/bin])
 
 case $host_os in
 aux*)

comment:21 Changed 6 weeks ago by andrew_b

  • Branch state changed from no branch to merged

Merged to master: [dbc92b8636306b49cbf3d42fb79c3a14280cb17c].

git log --oneline 25038829b..dbc92b863

comment:22 Changed 6 weeks ago by zaytsev

Re-adding shebangs in #3100.

comment:23 Changed 5 weeks ago by zaytsev

  • Status changed from new to accepted
  • Owner set to zaytsev
  • Branch state changed from merged to no branch

prepare repository for release
download PO-translations from Transifex
store translations in git repo
download the hint translations from Transifex
store translations in git repo
create new NEWS wiki page

NEWS-4.8.34

add content of current NEWS wiki page to the doc/NEWS
new version in Trac
new milestone in Trac
create new tag in git

4.8.33-pre1

create tar.(bz2|xz) package files

https://bugzilla.redhat.com/show_bug.cgi?id=2338285

make checksums for archives
upload source packages and checksums to the special upload area
developers should download tarballs, verify checksums, compile and install locally; if everything is ok, then developers vote for the ticket

done

comment:24 Changed 5 weeks ago by and

mhh, open-on-file-object breaks for me (hit enter => nothing happen)

bisected to 702c354602e1f3102894ec2a973588b34721dd3a but I can't found any bad on this commit.

comment:25 Changed 5 weeks ago by zaytsev

Hmmm, cannot reproduce on aarch64 - Ubuntu and Alpine. What are you testing on?

comment:26 Changed 5 weeks ago by zaytsev

Also works on Illumos / AMD64. I press Enter on config.h - editor opens. I press enter on version.sh - script runs.

comment:27 follow-up: ↓ 28 Changed 5 weeks ago by andrew_b

Seems extfs is broken. I cannot enter into zip, rpm, patch/diff, etc.

comment:28 in reply to: ↑ 27 Changed 5 weeks ago by andrew_b

Replying to andrew_b:

Seems extfs is broken. I cannot enter into zip, rpm, patch/diff, etc.

Sorry, there was --enable-vfs=no in my script.

comment:29 Changed 5 weeks ago by and

Gentoo, same compile steps

702c354602e1f3102894ec2a973588b34721dd3a # first bad # search: change types of start and end search positions from gsize to off_t.
bedd0da4eaccc73cb3a79997ac42c8d5b3822c2a # last good # mcedit (editsearch): minor refactoring.

simplify case with "view" by one-liner (same issue like "open" action)

rm -rf /tmp/mc ; MC_PROFILE_ROOT=/tmp/mc strace -o /tmp/strace.log /tmp/portage/app-misc/mc-9999/work/mc-9999/src/mc -v /tmp/test.pdf

bad

Compiler: x86_64-pc-linux-gnu-gcc
Compiler flags: -Wall -Wextra -Wattributes -Wimplicit-function-declaration -Wimplicit-int -Wno-declaration-after-statement -Wno-long-long -Wno-vla -Wincompatible-pointer-types -Wint-conversion -Wbad-function-cast -Wfloat-conversion -Wfloat-equal -Wformat-security -Wformat-signedness -Wimplicit-fallthrough -Wmis

sing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wmissing-variable-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wswitch-default -Wundef -Wunreachable-code -Wunused-result -Wwrite-strings -Wno-cast-function-type -Wno-assign-enum -march=x86-64-v3

Assertions: yes
Unit tests: no
File system: Midnight Commander Virtual Filesystem

cpio, extfs, shell, ftp, sfs, sftp, tar, undelfs

Screen library: NCursesw
Mouse support: xterm only
X11 events support: yes
With subshell support: yes
With background operations: yes
With ext2fs attributes support: yes
Internal editor: yes
Diff viewer: yes
Support for charset: yes
Search type: glib-regexp

GNU Midnight Commander 4.8.32-249-g702c35460
Built with GLib 2.80.5
Built with ncursesw 6.4
Built with libssh2 1.11.1
With builtin editor
With subshell support as default
With support for background operations
With mouse support on xterm
With support for X11 events
With multiple codepages support
With ext2fs attributes support
Virtual File Systems:

cpiofs, tarfs, sfs, extfs, ext2undelfs, ftpfs, sftpfs, shell

Data types:

char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64; uintmax_t: 64;

openat(AT_FDCWD, "/tmp/test.pdf", O_RDONLY|O_NONBLOCK) = 10
fstat(10, {st_mode=S_IFREG|0600, st_size=59887, ...}) = 0
lseek(10, 0, SEEK_SET)                  = 0
read(10, "%PDF", 4)                     = 4

good

Compiler: x86_64-pc-linux-gnu-gcc Compiler flags: -Wall -Wextra -Wattributes -Wimplicit-function-declaration -Wimplicit-int -Wno-declaration-after-statement -Wno-long-long -Wno-vla -Wincompatible-pointer-types -Wint-conversion -Wbad-function-cast -Wfloat-conversion -Wfloat-equal -Wformat-security -Wformat-signedness -Wimplicit-fallthrough -Wmis

sing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wmissing-variable-declarations -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wswitch-default -Wundef -Wunreachable-code -Wunused-result -Wwrite-strings -Wno-cast-function-type -Wno-assign-enum -march=x86-64-v3

Assertions: yes Unit tests: no
File system: Midnight Commander Virtual Filesystem

cpio, extfs, shell, ftp, sfs, sftp, tar, undelfs Screen library: NCursesw

Mouse support: xterm only
X11 events support: yes With subshell support: yes
With background operations: yes
With ext2fs attributes support: yes Internal editor: yes
Diff viewer: yes
Support for charset: yes Search type: glib-regexp

GNU Midnight Commander 4.8.32-248-gbedd0da4e
Built with GLib 2.80.5
Built with ncursesw 6.4
Built with libssh2 1.11.1
With builtin editor
With subshell support as default
With support for background operations
With mouse support on xterm
With support for X11 events
With multiple codepages support
With ext2fs attributes support
Virtual File Systems:

cpiofs, tarfs, sfs, extfs, ext2undelfs, ftpfs, sftpfs, shell

Data types:

char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64; uintmax_t: 64;

newfstatat(AT_FDCWD, "/tmp/mc-GAJ7Z2", {st_mode=S_IFDIR|0700, st_size=60, ...}, AT_SYMLINK_NOFOLLOW) = 0
getuid()                                = 0
openat(AT_FDCWD, "/tmp/mc-GAJ7Z2/mcextMXD8Z2", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0600) = 10
fcntl(10, F_GETFL)                      = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat(10, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
write(10, "#! /bin/sh\n\nMC_EXT_FILENAME=/tmp"..., 276) = 276

comment:30 Changed 5 weeks ago by zaytsev

So can you reproduce it on another Gentoo system or on the same system with a different compiler? Maybe this "innocent" commit triggers some kind of miscompilation? Can you check the difference between the two binaries? On all system I have latest master works just fine.

comment:31 Changed 5 weeks ago by and

Same on different hosts. Workaround on my side is to change /etc/mc/mc.ext.ini:
from

Type=^PDF

to

Shell=.pdf

comment:32 Changed 5 weeks ago by andrew_b

Confirm that pdf isn't opened.

comment:33 Changed 5 weeks ago by andrew_b

The problem is in ext.c:770

found = mc_search_run (search, content_string + content_shift, 0, -1, NULL);

where -1 is end_search.
Previously, when end_search had type gsize (unsigned), -1 meant SIZE_MAX, a large positive number.
Now end_search has type off_t (signed), -1 means -1.
Replacing -1 with some large positive number fixes the problem.

  • src/filemanager/ext.c

    diff --git a/src/filemanager/ext.c b/src/filemanager/ext.c
    index 5acf0dd1a..e676cb913 100644
    a b regex_check_type (const vfs_path_t *filename_vpath, const char *ptr, gboolean ca 
    767767        { 
    768768            search->search_type = MC_SEARCH_T_REGEX; 
    769769            search->is_case_sensitive = !case_insense; 
    770             found = mc_search_run (search, content_string + content_shift, 0, -1, NULL); 
     770            found = 
     771                mc_search_run (search, content_string + content_shift, 0, 
     772                               sizeof (content_string) - 1, NULL); 
    771773            mc_search_free (search); 
    772774        } 
    773775        else 

comment:34 follow-up: ↓ 35 Changed 5 weeks ago by zaytsev

Wow, thanks for finding an explanation to the problem!

I'm not sure of what to think of this off_t. On one hand, I've read that it should be used to expressing file positions and offsets. On the other hand, here I think the parameters can't be negative by construction. But then again, maybe "abusing" this with -1 is actually a bad thing, so it's good that it was noticed and fixed. If you think that off_t is the right type, please feel free to commit your fix to master.

I wonder what we can do to avoid using negative stuff by accident in the future. Is an assertion on the parameters a good idea?

comment:35 in reply to: ↑ 34 Changed 5 weeks ago by andrew_b

Replying to zaytsev:

If you think that off_t is the right type, please feel free to commit your fix to master.

changeset:ce645982fb732decc25a997e1cf922d7c7b63c70

I wonder what we can do to avoid using negative stuff by accident in the future. Is an assertion on the parameters a good idea?

Probably yes but let's do that after release. Since start and end search positions are absolute positions in buffer or file, negative values are unexpected. From other hand, signed type off_t is used internally in editor and viewer and usage off_t in search API is correct.

comment:36 Changed 4 weeks ago by zaytsev

  • Status changed from accepted to testing
  • Resolution set to fixed

download PO-translations from Transifex
store translations in git repo
new version in Trac
create new tag in git
create tar.(bz2|xz) package files
make checksums for archives
run ssh midnightcommander@...
check that files can be dowloaded
update Wiki start page with latest release number
write an announcement: list user visible changes
write an announcement: list user visible changes (bugs and features)
create new ticket (type=task, component=adm) for the next release

#4633

close ticket for release
close current milestone

comment:37 Changed 4 weeks ago by zaytsev

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.