NetBSD Problem Report #58840

From www@netbsd.org  Thu Nov 21 21:18:36 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits)
	 client-signature RSA-PSS (2048 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 996A11A9238
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 21 Nov 2024 21:18:36 +0000 (UTC)
Message-Id: <20241121211835.641A61A923E@mollari.NetBSD.org>
Date: Thu, 21 Nov 2024 21:18:35 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: expat leaks internal symbols
X-Send-Pr-Version: www-1.0

>Number:         58840
>Category:       lib
>Synopsis:       expat leaks internal symbols
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 21 21:20:01 +0000 2024
>Last-Modified:  Sun Nov 24 04:30:05 +0000 2024
>Originator:     Taylor R Campbell
>Release:        current, 10, 9, ...
>Organization:
The NexpatBSymbolD Excess
>Environment:
>Description:
Upstream builds libexpat.so with -fvisibility=hidden and marks exported symbols explicitly, but we don't pass -fvisibility=hidden so various internal symbols leak out:

_INTERNAL_trim_to_complete_utf8_characters
testingAccountingGetCountBytesDirect
testingAccountingGetCountBytesIndirect
unsignedCharToPrintable

>How-To-Repeat:
nm, code inspection
>Fix:
Like with libarchive (PR lib/58829: libarchive exports excess symbols, https://gnats.NetBSD.org/58829), we should build with -fvisibility=hidden although this means dropping some symbols in the current library.

>Audit-Trail:
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/58840 CVS commit: src/external/mit/expat/lib/libexpat
Date: Sun, 24 Nov 2024 04:25:16 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Sun Nov 24 04:25:16 UTC 2024

 Added Files:
 	src/external/mit/expat/lib/libexpat: expat.expsym

 Log Message:
 external/mit/expat: Add expected symbols list.

 NOTE: This has some extraneous internal crud that shouldn't be
 exported, PR lib/58840: expat leaks internal symbols.

 PR lib/58838: shared libraries in base should all have expsym lists


 To generate a diff of this commit:
 cvs rdiff -u -r0 -r1.1 src/external/mit/expat/lib/libexpat/expat.expsym

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.