Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1242302

Bug#346447: gopher: FTBFS on hurd

From John Goerzen <jgoerzen@complete.org>
Newsgroups linux.debian.bugs.dist
Subject Bug#346447: gopher: FTBFS on hurd
Date 2025-04-16 14:50 +0200
Message-ID <KCanf-dWrf-7@gated-at.bofh.it> (permalink)
References (1 earlier) <KA6QN-cAJp-3@gated-at.bofh.it> <KAdfz-cEQC-5@gated-at.bofh.it> <KC9Kx-dWb4-3@gated-at.bofh.it> <KA6QN-cAJp-5@gated-at.bofh.it> <KC9Kx-dWb4-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Apr 16 2025, João Pedro Malhado wrote:

> Hello John,
>
> Thank you for having a look at the patch.
> I apologise as the patch is indeed a bit rushed.
>
> On Thu, Apr 10, 2025 at 10:15:02PM -0500, John Goerzen wrote:
>> Thank you for sending this patch!  I don't believe it's correct,
>> however.
>> 
>> On line 202, curcwd is malloced.  Overwriting it prevents freeing it
>> later, so this creates a memory leak.
>> 
>> I suspect the later instance also has that issue.
>
> I see what you mean. Instead of allocating the memory on line 202, would it not
> be possible to dynamically allocate with getcwd(NULL, 0) when that function is
> available?
> Is there any case that would not be covered by this?

I think that would work fine on Linux and Hurd.  That behavior, however,
isn't POSIX so wouldn't be portable.  Can you clarify what the problem
with getcwd() as written is on Hurd?  From the description in glibc, it
sounds like the behavior is the same as on Linux.

- John


>
>
>> How exactly is getcwd() defined and used on Hurd?
>
> My understanding is that on Hurd getcwd() is just defined in glibc. Looking at
> the comment in
> https://sources.debian.org/src/glibc/2.41-7/io/getcwd.c/?hl=39#L25
>
> Many thanks,
> João

Back to linux.debian.bugs.dist | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Bug#346447: gopher: FTBFS on hurd João Pedro Malhado <phlogiston@sapo.pt> - 2025-04-10 22:40 +0200
  Bug#346447: gopher: FTBFS on hurd John Goerzen <jgoerzen@complete.org> - 2025-04-11 05:30 +0200
    Bug#346447: gopher: FTBFS on hurd João Pedro Malhado <phlogiston@sapo.pt> - 2025-04-16 14:10 +0200
      Bug#346447: gopher: FTBFS on hurd John Goerzen <jgoerzen@complete.org> - 2025-04-16 14:50 +0200
        Bug#346447: gopher: FTBFS on hurd João Pedro Malhado <phlogiston@sapo.pt> - 2025-04-16 15:20 +0200
          Bug#346447: gopher: FTBFS on hurd John Goerzen <jgoerzen@complete.org> - 2025-04-20 06:30 +0200
            Bug#346447: gopher: FTBFS on hurd João Pedro Malhado <phlogiston@sapo.pt> - 2025-04-20 23:40 +0200
            Bug#346447: gopher: FTBFS on hurd João Pedro Malhado <phlogiston@sapo.pt> - 2025-04-24 16:40 +0200

csiph-web