[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH gnumach] Use c_string to define host_get_kernel_version and h

From: Sergey Bugaev
Subject: Re: [PATCH gnumach] Use c_string to define host_get_kernel_version and host_get_kernel_boot_info.
Date: Wed, 15 Mar 2023 10:20:26 +0300

On Wed, Mar 15, 2023 at 9:19 AM Flávio Cruz <flaviocruz@gmail.com> wrote:
> Still, at the
> end of the day we should only have two ways of defining strings, either 
> through
> c_string or by using variable arrays as defined by data_t.


I have not looked at your string patches in detail, but please tell me
we're finally moving away from passing strings as char[1024]?

This is *so bad*. We tell people we don't have PATH_MAX because "The
Hurd, following the GNU Coding Standards, tries to avoid this kind of
arbitrary limits", and then we limit strings (and effectively paths)
to 1024 bytes. There are even comments saying "XXX string_t LOSES!"
all over glibc, whenever it has to allocate char[1024] on the stack.

So again, if you haven't already, please look into getting rid of this
awful char[1024] thing, and using proper dynamically-sized strings.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]