* non-standard const-preserving string APIs @ 2026-05-16 18:15 Alejandro Colomar 2026-05-17 12:22 ` Adhemerval Zanella Netto 0 siblings, 1 reply; 7+ messages in thread From: Alejandro Colomar @ 2026-05-16 18:15 UTC (permalink / raw) To: libc-alpha; +Cc: linux-man [-- Attachment #1: Type: text/plain, Size: 472 bytes --] Hi! I'm working on documenting the recent API change of strchr(3) et al. to adapt to C23. While doing that, I've realized that the related APIs that are not standardized by ISO C, such as memrchr(3), have not been changed consistently with their relatives. Has this been discussed? I think the inconsistency might be dangerous. Should we change the other string functions accordingly? Have a lovely day! Alex -- <https://www.alejandro-colomar.es> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: non-standard const-preserving string APIs 2026-05-16 18:15 non-standard const-preserving string APIs Alejandro Colomar @ 2026-05-17 12:22 ` Adhemerval Zanella Netto 2026-05-17 13:59 ` Alejandro Colomar 0 siblings, 1 reply; 7+ messages in thread From: Adhemerval Zanella Netto @ 2026-05-17 12:22 UTC (permalink / raw) To: Alejandro Colomar, libc-alpha; +Cc: linux-man On 16/05/26 15:15, Alejandro Colomar wrote: > Hi! > > I'm working on documenting the recent API change of strchr(3) et al. > to adapt to C23. While doing that, I've realized that the related APIs > that are not standardized by ISO C, such as memrchr(3), have not been > changed consistently with their relatives. Has this been discussed? > > I think the inconsistency might be dangerous. Should we change the > other string functions accordingly? I think it is reasonable to support const-preserving to the GNU interfaces as well. Are you preparing a patch? ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: non-standard const-preserving string APIs 2026-05-17 12:22 ` Adhemerval Zanella Netto @ 2026-05-17 13:59 ` Alejandro Colomar 2026-05-18 17:19 ` Adhemerval Zanella Netto 0 siblings, 1 reply; 7+ messages in thread From: Alejandro Colomar @ 2026-05-17 13:59 UTC (permalink / raw) To: Adhemerval Zanella Netto; +Cc: libc-alpha, linux-man [-- Attachment #1: Type: text/plain, Size: 971 bytes --] Hi Adhemerval, On 2026-05-17T09:22:41-0300, Adhemerval Zanella Netto wrote: > > > On 16/05/26 15:15, Alejandro Colomar wrote: > > Hi! > > > > I'm working on documenting the recent API change of strchr(3) et al. > > to adapt to C23. While doing that, I've realized that the related APIs > > that are not standardized by ISO C, such as memrchr(3), have not been > > changed consistently with their relatives. Has this been discussed? > > > > I think the inconsistency might be dangerous. Should we change the > > other string functions accordingly? > I think it is reasonable to support const-preserving to the GNU interfaces as > well. Are you preparing a patch? Yup, I will. Thanks! Have a lovely day! Alex P.S.: Adhemerval, would you mind having a look at my other recent patch set? It was 'Add [v]aprintf(3)'. The message-ID was: Message-ID: <cover.1776882798.git.alx@kernel.org> -- <https://www.alejandro-colomar.es> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: non-standard const-preserving string APIs 2026-05-17 13:59 ` Alejandro Colomar @ 2026-05-18 17:19 ` Adhemerval Zanella Netto [not found] ` <CAJYzjmezHCPUUpE+w35+TB_70V3=BGq7uD3geEdywP5-OXSU-g@mail.gmail.com> 2026-06-01 11:41 ` Florian Weimer 0 siblings, 2 replies; 7+ messages in thread From: Adhemerval Zanella Netto @ 2026-05-18 17:19 UTC (permalink / raw) To: Alejandro Colomar, Florian Weimer; +Cc: libc-alpha, linux-man On 17/05/26 10:59, Alejandro Colomar wrote: > Hi Adhemerval, > > On 2026-05-17T09:22:41-0300, Adhemerval Zanella Netto wrote: >> >> >> On 16/05/26 15:15, Alejandro Colomar wrote: >>> Hi! >>> >>> I'm working on documenting the recent API change of strchr(3) et al. >>> to adapt to C23. While doing that, I've realized that the related APIs >>> that are not standardized by ISO C, such as memrchr(3), have not been >>> changed consistently with their relatives. Has this been discussed? >>> >>> I think the inconsistency might be dangerous. Should we change the >>> other string functions accordingly? >> I think it is reasonable to support const-preserving to the GNU interfaces as >> well. Are you preparing a patch? > > Yup, I will. Thanks! I will try to take a look, but I recall from previous weekly calls that Florian has raised objection that this does not solve the overflow issue (not without further extra changes). I am not sure if he still keep his objection, nor if it is would a blocker for this new api. ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <CAJYzjmezHCPUUpE+w35+TB_70V3=BGq7uD3geEdywP5-OXSU-g@mail.gmail.com>]
* Re: non-standard const-preserving string APIs [not found] ` <CAJYzjmezHCPUUpE+w35+TB_70V3=BGq7uD3geEdywP5-OXSU-g@mail.gmail.com> @ 2026-05-18 18:27 ` Adhemerval Zanella Netto 0 siblings, 0 replies; 7+ messages in thread From: Adhemerval Zanella Netto @ 2026-05-18 18:27 UTC (permalink / raw) To: Samuel Bronson; +Cc: Alejandro Colomar, Florian Weimer, libc-alpha, linux-man On 18/05/26 15:17, Samuel Bronson wrote: > On Mon, May 18, 2026, 1:19 PM Adhemerval Zanella Netto <adhemerval.zanella@linaro.org <mailto:adhemerval.zanella@linaro.org>> wrote: > > On 17/05/26 10:59, Alejandro Colomar wrote: > > Hi Adhemerval, > > > > On 2026-05-17T09:22:41-0300, Adhemerval Zanella Netto wrote: > >> > >> > >> On 16/05/26 15:15, Alejandro Colomar wrote: > >>> Hi! > >>> > >>> I'm working on documenting the recent API change of strchr(3) et al. > >>> to adapt to C23. While doing that, I've realized that the related APIs > >>> that are not standardized by ISO C, such as memrchr(3), have not been > >>> changed consistently with their relatives. Has this been discussed? > >>> > >>> I think the inconsistency might be dangerous. Should we change the > >>> other string functions accordingly? > >> I think it is reasonable to support const-preserving to the GNU interfaces as > >> well. Are you preparing a patch? > > > > Yup, I will. Thanks! > I will try to take a look, but I recall from previous weekly calls that Florian > has raised objection that this does not solve the overflow issue (not without > further extra changes). > > > I'm having trouble finding messages that seem relevant: <https://inbox.sourceware.org/libc-alpha/?q=memrchr+f%3AFlorian <https://inbox.sourceware.org/libc-alpha/?q=memrchr+f%3AFlorian>> only turns up a few messages, most of them patches; I'm working from the assumption that Florian does not exclusively use patch descriptions to convey such information? Perhaps it was on another list, or another function was mentioned, or wildcards were used? (Or it was somebody else's opinion you were thinking of? Or public-inbox doesn't go that far back?) > > Can you find the message? > > (Or I guess we could wait for Florian to chime in ...) > Sorry if I was being confusing, I was replying to the PS: P.S.: Adhemerval, would you mind having a look at my other recent patch set? It was 'Add [v]aprintf(3)'. The message-ID was: Message-ID: <cover.1776882798.git.alx@kernel.org> Not for this proposal itself. And Florian's remarks can be found on the previous version [1]. He add a bit more on the weekly call some weeks ago, I don't recall the context in full. [1] https://sourceware.org/pipermail/libc-alpha/2026-March/176018.html ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: non-standard const-preserving string APIs 2026-05-18 17:19 ` Adhemerval Zanella Netto [not found] ` <CAJYzjmezHCPUUpE+w35+TB_70V3=BGq7uD3geEdywP5-OXSU-g@mail.gmail.com> @ 2026-06-01 11:41 ` Florian Weimer 2026-06-01 22:10 ` Alejandro Colomar 1 sibling, 1 reply; 7+ messages in thread From: Florian Weimer @ 2026-06-01 11:41 UTC (permalink / raw) To: Adhemerval Zanella Netto; +Cc: Alejandro Colomar, libc-alpha, linux-man * Adhemerval Zanella Netto: > On 17/05/26 10:59, Alejandro Colomar wrote: >> Hi Adhemerval, >> >> On 2026-05-17T09:22:41-0300, Adhemerval Zanella Netto wrote: >>> >>> >>> On 16/05/26 15:15, Alejandro Colomar wrote: >>>> Hi! >>>> >>>> I'm working on documenting the recent API change of strchr(3) et al. >>>> to adapt to C23. While doing that, I've realized that the related APIs >>>> that are not standardized by ISO C, such as memrchr(3), have not been >>>> changed consistently with their relatives. Has this been discussed? >>>> >>>> I think the inconsistency might be dangerous. Should we change the >>>> other string functions accordingly? >>> I think it is reasonable to support const-preserving to the GNU interfaces as >>> well. Are you preparing a patch? >> >> Yup, I will. Thanks! > I will try to take a look, but I recall from previous weekly calls > that Florian has raised objection that this does not solve the > overflow issue (not without further extra changes). <https://inbox.sourceware.org/libc-alpha/lhums05zjuh.fsf@oldenburg.str.redhat.com/> > I am not sure if he still keep his objection, nor if it is would a > blocker for this new api. I still think we should fix it. Maybe rename the “done” variable in the vfprintf internals to “ssize_t”, and then gradually fix the compilation failures, investigating whether the change is correct in context. We need to add some early bailout in case INT_MAX is crossed for the non-aprintf case. Thanks, Florian ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: non-standard const-preserving string APIs 2026-06-01 11:41 ` Florian Weimer @ 2026-06-01 22:10 ` Alejandro Colomar 0 siblings, 0 replies; 7+ messages in thread From: Alejandro Colomar @ 2026-06-01 22:10 UTC (permalink / raw) To: Florian Weimer; +Cc: Adhemerval Zanella Netto, libc-alpha, linux-man [-- Attachment #1: Type: text/plain, Size: 1147 bytes --] Hi Florian, On 2026-06-01T13:41:16+0200, Florian Weimer wrote: > > I will try to take a look, but I recall from previous weekly calls > > that Florian has raised objection that this does not solve the > > overflow issue (not without further extra changes). > > <https://inbox.sourceware.org/libc-alpha/lhums05zjuh.fsf@oldenburg.str.redhat.com/> > > > I am not sure if he still keep his objection, nor if it is would a > > blocker for this new api. > > I still think we should fix it. Maybe rename the “done” variable in the > vfprintf internals to “ssize_t”, and then gradually fix the compilation > failures, investigating whether the change is correct in context. We > need to add some early bailout in case INT_MAX is crossed for the > non-aprintf case. Would you mind at least confirming whether the current patches are OK modulo the EOVERFLOW issue? It's the first time I touch many of these files (e.g., abilist files), and I'd appreciate if you reviewed it so that I can forget about that part. Have a lovely night! Alex > > Thanks, > Florian > -- <https://www.alejandro-colomar.es> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-06-01 22:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-16 18:15 non-standard const-preserving string APIs Alejandro Colomar
2026-05-17 12:22 ` Adhemerval Zanella Netto
2026-05-17 13:59 ` Alejandro Colomar
2026-05-18 17:19 ` Adhemerval Zanella Netto
[not found] ` <CAJYzjmezHCPUUpE+w35+TB_70V3=BGq7uD3geEdywP5-OXSU-g@mail.gmail.com>
2026-05-18 18:27 ` Adhemerval Zanella Netto
2026-06-01 11:41 ` Florian Weimer
2026-06-01 22:10 ` Alejandro Colomar
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox