Bug 255167 - devel/universal-ctags: fix 32 bit platforms and unit test on 13
Summary: devel/universal-ctags: fix 32 bit platforms and unit test on 13
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Fernando Apesteguía
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-18 06:06 UTC by Derek Schrock
Modified: 2021-04-20 16:25 UTC (History)
1 user (show)

See Also:


Attachments
Fix unit test on 13 and 32-bit builds (3.08 KB, patch)
2021-04-18 06:06 UTC, Derek Schrock
dereks: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Derek Schrock 2021-04-18 06:06:32 UTC
Created attachment 224206 [details]
Fix unit test on 13 and 32-bit builds

- bit shifting when right side is >= size of left side results in
  unknown behavior on some 32-bit platforms.  Reported upstream [1] 
  and being fixed [2]

  Once fixed in arithy/packcc universal-ctags/ctags will need to import.

- Fix regex in unit test due to possible bug with FreeBSD 13.

portlint: ok.
testport: ok. 13amd64 13i386.
unittest: ok. 1176 passed.
Comment 2 Fernando Apesteguía freebsd_committer freebsd_triage 2021-04-20 13:51:41 UTC
It does not build in 11.4 or 12.2 i386. I get this error:

--- main/libctags_a-parse.o ---
mv -f main/.deps/libctags_a-parse.Tpo main/.deps/libctags_a-parse.Po
--- ./packcc ---
1 warning generated.
--- peg/varlink.c ---
--- peg/kotlin.c ---
--- peg/varlink.c ---
./packcc -o ./peg/varlink "peg/varlink.peg"
--- peg/kotlin.c ---
./packcc -o ./peg/kotlin "peg/kotlin.peg"
--- peg/varlink.c ---
Segmentation fault (core dumped)
*** [peg/varlink.c] Error code 139
Comment 3 Derek Schrock 2021-04-20 16:08:27 UTC
You sure you applied the complete attached patch?

Does files/ have patch-misc_packcc_src_packcc.c?

# make patch
...
# grep -n SIZE_T work/ctags-p5.9.20210411.0/misc/packcc/src/packcc.c
913:#if (defined __SIZEOF_SIZE_T__ && __SIZEOF_SIZE_T__ == 8)
Comment 4 Fernando Apesteguía freebsd_committer freebsd_triage 2021-04-20 16:19:01 UTC
(In reply to Derek Schrock from comment #3)

(*cough*)

I had it perfectly applied in my ports tree but not in my poudriere's tree.
Let's end this embarrassing moment...

Thanks for double checking!
Comment 5 commit-hook freebsd_committer freebsd_triage 2021-04-20 16:24:37 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=803383519aa63406409d2a88b88425e902bb93d8

commit 803383519aa63406409d2a88b88425e902bb93d8
Author:     Fernando Apesteguía <fernape@FreeBSD.org>
AuthorDate: 2021-04-20 07:32:07 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2021-04-20 16:20:54 +0000

    devel/universal-ctags: fix 32 bit platforms and unit test on  13

    * bit shifting when right side is >= size of left side results in
      unknown behavior on some 32-bit platforms.  Reported upstream [1]
      and being fixed [2]

      Once fixed in arithy/packcc universal-ctags/ctags will need to import.

    * Fix regex in unit test due to possible bug with FreeBSD 13.

    PR:     255167
    Reported by:    dereks@lifeofadishwasher.com (maintainer)

 .../files/patch-Tmain_map-removing.d_run.sh (new)  | 32 ++++++++++++++++++++++
 .../files/patch-misc_packcc_src_packcc.c (new)     | 11 ++++++++
 2 files changed, 43 insertions(+)
Comment 6 Fernando Apesteguía freebsd_committer freebsd_triage 2021-04-20 16:25:09 UTC
Committed,

Thanks!