View Issue Details

IDProjectCategoryView StatusLast Update
00018471003.1(2024)/Issue8System Interfacespublic2024-09-16 17:08
Reporterphilip-guenther Assigned To 
PrioritynormalSeverityObjectionTypeError
Status Interpretation RequiredResolutionAccepted As Marked 
NamePhilip Guenther
OrganizationOpenBSD
User Reference
Sectiondlfnc.h and dladdr()
Page Number238 and
Line Number8391 and
Interp StatusApproved
Final Accepted Text0001847:0006863
Summary0001847: dladdr()'s second argument should be Dl_info*, not Dl_info_t*
DescriptionThe common opensource systems of Linux, FreeBSD, NetBSD, and OpenBSD all have an existing dladdr() whose second argument is Dl_info*, not Dl_info_t*.
Desired ActionRequire implementations to provide Dl_info as an equivalent type to its current Dl_info_t

Mark the Dl_info_t type as obsolescent, or with a future direction of removal, or whatever can be done to clean this up. ("The standard is clear, but concerns have been raised to the sponsor...")
Tagstc1-2024

Activities

geoffclare

2024-08-05 14:41

manager   bugnote:0006856

I am in favour of adding Dl_info as a synonym for Dl_info_t.

I am not in favour of deprecating Dl_info_t (with a view to removing it in Issue 9). Since Solaris 11 has specified Dl_info_t in its dladdr() man page for many years, there will be existing code which uses it. (And there may well be more code written between now and TC1 that follows the standard as published, by people unaware of this request.) I don't see a desire to "clean this up" as sufficient justification for forcing such code to change in order for it to conform to Issue 9.

I'd suggest instead that we add some application usage along these lines:
Although this standard requires Dl_info and Dl_info_t to be defined as synonyms for the same type, historically many systems only defined Dl_info and did not define Dl_info_t. Consequently, choosing to use Dl_info over Dl_info_t may provide better portability to non-conforming implementations (such as those which conform to earlier versions of this standard from before dladdr() was added but which also provide dladdr() as an extension).

philip-guenther

2024-08-11 01:46

reporter   bugnote:0006859

That'll increase the portability over what's there, so sure.

philip-guenther

2024-08-11 01:47

reporter   bugnote:0006860

(It feels like there was a process miss/failure in the alteration of the original request without call-out of the alternation in the ticket, but I don't have a magic way to catch that in the future, other than "everyone reads and puts cycles on EVERYTHING". :| oh well)

geoffclare

2024-08-15 15:33

manager   bugnote:0006863

Interpretation response
------------------------
The standard states that <dlfcn.h> defines Dl_info_t and does not define Dl_info, and conforming implementations must conform to this. However, concerns have been raised about this which are being referred to the sponsor.

Rationale:
-------------
There is existing application code that uses Dl_info_t and existing code that uses Dl_info. To enable both to be ported to a standard-conforming environment with minimal change, the standard should define both types.

Notes to the Editor (not part of this interpretation):
-------------------------------------------------------
After page 238 line 8393 section <dlfcn.h>, add:
The <dlfcn.h> header shall define the Dl_info type to be the same type as Dl_info_t.


On page 238 line 8409 section <dlfcn.h>, change APPLICATION USAGE from "None" to:
Although this standard requires Dl_info and Dl_info_t to be defined as synonyms for the same type, historically many systems only defined Dl_info and did not define Dl_info_t. Consequently, choosing to use Dl_info over Dl_info_t may provide better portability to non-conforming implementations (such as those which conform to earlier versions of this standard from before dladdr() was added but which also provide dladdr() as an extension).

agadmin

2024-08-15 15:56

administrator   bugnote:0006864

Interpretation proposed: 15 August 2024

agadmin

2024-09-16 17:08

administrator   bugnote:0006878

Interpretation approved: September 16 2024

Issue History

Date Modified Username Field Change
2024-08-02 01:15 philip-guenther New Issue
2024-08-02 01:15 philip-guenther Name => Philip Guenther
2024-08-02 01:15 philip-guenther Organization => OpenBSD
2024-08-02 01:15 philip-guenther Section => dlfnc.h and dladdr()
2024-08-02 01:15 philip-guenther Page Number => 238 and
2024-08-02 01:15 philip-guenther Line Number => 8391 and
2024-08-05 14:41 geoffclare Note Added: 0006856
2024-08-11 01:46 philip-guenther Note Added: 0006859
2024-08-11 01:47 philip-guenther Note Added: 0006860
2024-08-15 15:33 geoffclare Note Added: 0006863
2024-08-15 15:34 geoffclare Interp Status => Pending
2024-08-15 15:34 geoffclare Final Accepted Text => 0001847:0006863
2024-08-15 15:34 geoffclare Status New => Interpretation Required
2024-08-15 15:34 geoffclare Resolution Open => Accepted As Marked
2024-08-15 15:35 geoffclare Tag Attached: tc1-2024
2024-08-15 15:56 agadmin Interp Status Pending => Proposed
2024-08-15 15:56 agadmin Note Added: 0006864
2024-09-16 17:08 agadmin Interp Status Proposed => Approved
2024-09-16 17:08 agadmin Note Added: 0006878