[Bug 295887] devel/icu: request for update to 78.3

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 04 Sep 2026 11:46:32 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295887

Mikhail Teterin <mi@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #271542|0                           |1
        is obsolete|                            |
                 CC|                            |mi@FreeBSD.org

--- Comment #4 from Mikhail Teterin <mi@FreeBSD.org> ---
Created attachment 274404
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=274404&action=edit
Update to 78.3 with tests fixed

How about this version?..

Keep USES+= and CONFIGURE_ARGS?= as they are -- devel/icu-lx sets both
before including this Makefile.

Fixes to "make test" failures -- courtesy of Claude Opus 5. They
are not new in 78.3: 76.1 fails identically, in the same three places.
Nor are they really test bugs.  config/mh-bsd-gcc links the shared
libraries with -Wl,-Bsymbolic, which also binds the libraries' internal
data references -- including the type_info pointer stored in every vtable
-- to the library's own copies.  A non-PIE executable, which is what
ports produce by default, copy-relocates those type_info objects into its
.bss, so the object's vtable and the executable name the same C++ type by
two different addresses; libcxxrt compares __class_type_info by address.
Every dynamic_cast to an ICU class therefore returns nullptr, for any
non-PIE consumer, not just for the test programs:

        % cat lib.h
        struct Base { virtual ~Base(); };
        struct Derived : Base { int x; ~Derived() override; };
        Base *make();
        % c++ -fPIC -shared -o liba.so lib.cpp -Wl,-Bsymbolic
        % c++ -o main main.cpp -L. -la  # main() dynamic_casts make()
        % ./main
        dynamic_cast -> nullptr (BROKEN)

intltest is merely where it becomes visible.  It segfaults in
CharIterTest/TestConstructionAndEquality, which dereferences the null
result of a dynamic_cast, and reports the two LocaleTest failures quoted
in the PR, both of which are also failed casts to DecimalFormat.

-Wl,-Bsymbolic-functions keeps the intra-library call binding upstream
wanted, leaves data symbols interposable, and makes intltest, iotest and
cintltst pass. Verified on 15.1-STABLE/amd64: "make test" now exits 0
and "make check-plist" is clean.

Apparently, Linux does not see this problem, because they compile executables
(not just shared libraries) with PIE. And because their libstdc++ falls back to
strcmp() in some cases...

-- 
You are receiving this mail because:
You are the assignee for the bug.