[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: Flávio Cruz
Subject: Re: [PATCH gnumach] Use c_string to define host_get_kernel_version and host_get_kernel_boot_info.
Date: Sat, 18 Mar 2023 23:24:18 -0400

On Wed, Mar 15, 2023 at 3:20 AM Sergey Bugaev <bugaevc@gmail.com> wrote:
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.

This is fixing a different problem, but couldn't agree more with you on the
use of fixed sized strings for those RPCs when we do support
dynamically-sized strings through MiG.


reply via email to

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