Bug 234294 - x11/rxvt-unicode: fails to start with: Assertion failed: (!argv[argc]), function perl_parse, file perl.c, line 1677.
Summary: x11/rxvt-unicode: fails to start with: Assertion failed: (!argv[argc]), funct...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Thierry Thomas
Depends on:
Reported: 2018-12-23 10:59 UTC by Roman Bogorodskiy
Modified: 2018-12-27 08:54 UTC (History)
0 users

See Also:
thierry: maintainer-feedback+

fix perl_parse usage (1015 bytes, patch)
2018-12-23 11:40 UTC, Roman Bogorodskiy
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Bogorodskiy freebsd_committer 2018-12-23 10:59:29 UTC
After recent upgrade rxvt-unicode fails to start:

$ urxvt
Assertion failed: (!argv[argc]), function perl_parse, file perl.c, line 1677.
zsh: abort      urxvt

pkg version is rxvt-unicode-9.22.

Options        :
        256_COLOR      : on
        BACKSPACE_KEY  : on
        COMBINING      : on
        DELETE_KEY     : on
        DOCS           : off
        GDK_PIXBUF     : on
        IMLOCALE_FIX   : on
        ISO14755       : on
        MOUSEWHEEL     : on
        NEXT_SCROLLBAR : on
        NOTIFY         : off
        PERL           : on
        RXVT_SCROLLBAR : on
        SMART_RESIZE   : on
        UNICODE3       : on
        XIM            : on
Shared Libs required:

$ uname -rsm
FreeBSD 13.0-CURRENT amd64

rxvt-unicode package (and all others on the system) were built using poudriere from a portstree updated on 2018-12-22.
Comment 1 Roman Bogorodskiy freebsd_committer 2018-12-23 11:40:01 UTC
Created attachment 200389 [details]
fix perl_parse usage

Apparently, rxvt-unicode doesn't property format argv/argc that it passes to perl.

From https://perldoc.perl.org/perlembed.html:

"Mind that argv[argc] must be NULL, same as those passed to a main function in C."

And rxvt-unicode doesn't do that. Also, it looks like starting perl 5.27 there are asserts that check that:


Hence, now it fails with 5.28.

Attached patch fixes the problem for me.
Comment 2 Roman Bogorodskiy freebsd_committer 2018-12-23 13:03:50 UTC
Reported to upstream as well: http://lists.schmorp.de/pipermail/rxvt-unicode/2018q4/002488.html
Comment 3 Thierry Thomas freebsd_committer 2018-12-25 12:44:02 UTC
Approved, thanks!
Comment 4 Roman Bogorodskiy freebsd_committer 2018-12-25 16:26:06 UTC
(In reply to Thierry Thomas from comment #3)

Thanks! Do you want me to commit this or you'll commit it yourself?

Also, I think it'd be good to bump PORTREVISION, even though it should only affect users with DEBUG enabled.

Also, the patch was committed upstream: http://cvs.schmorp.de/rxvt-unicode/src/rxvtperl.xs?r1=1.242&r2=1.243. I notice the only difference is that NULL was changed to 0.
Comment 5 Thierry Thomas freebsd_committer 2018-12-25 16:56:51 UTC
Do not hesitate to commit it yourself!
Comment 6 commit-hook freebsd_committer 2018-12-27 08:52:47 UTC
A commit references this bug:

Author: novel
Date: Thu Dec 27 08:51:37 UTC 2018
New revision: 488515
URL: https://svnweb.freebsd.org/changeset/ports/488515

  x11/rxvt-unicode: fix perl_parse() usage

  Perl 5.28 added asserts to perl_parse() to check passed arguments, so
  rxvt with perl support fails to start with assertion error when
  DEBUG is enabled. Fix by constructing arguments passed to
  perl_parse() properly, and bump PORTREVISION.

  PR:		234294
  Approved by:	thierry (maintainer)

Comment 7 Roman Bogorodskiy freebsd_committer 2018-12-27 08:54:01 UTC
Thanks, committed!