Bug 30156 - Potential ntp_gettime abi break
Summary: Potential ntp_gettime abi break
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: time (show other bugs)
Version: 2.32
: P2 normal
Target Milestone: 2.38
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-22 17:27 UTC by Kacper Piwiński
Modified: 2023-03-10 18:12 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
patch (559 bytes, patch)
2023-02-22 18:01 UTC, Kacper Piwiński
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kacper Piwiński 2023-02-22 17:27:05 UTC
Between versions v2.11 and v2.12 struct ntptimeval got new fields.
That wasn't a problem because new function ntp_gettimex was created
(and made default) to support new struct. Old ntp_gettime was not
using new fields so it was safe to call with old struct
definition. Then between versions v2.31 and v2.32 when working on
y2038 support, ntp_gettime start setting new fields. Is my reasoning correct that this constitutes abi break for old binaries using ntp_gettime function?


And second question.
what about ntptimeval struct getting new members. Wasn't that abi break if for example some library used that struct in their public interface?
Comment 1 Kacper Piwiński 2023-02-22 18:01:26 UTC
Created attachment 14706 [details]
patch
Comment 2 Adhemerval Zanella 2023-03-10 18:12:10 UTC
Fixed on 2.38.