Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250806125933.GN1827@brightrain.aerifal.cx>
Date: Wed, 6 Aug 2025 08:59:33 -0400
From: Rich Felker <dalias@...c.org>
To: Sertonix <sertonix@...teo.net>
Cc: musl@...ts.openwall.com
Subject: Re: Always false #ifdef using undefined function
 get_page_size()

On Wed, Aug 06, 2025 at 10:31:18AM +0000, Sertonix wrote:
> Hi,
> 
> I noticed that following code inside of src/malloc/mallocng/malloc.c:
> #ifndef PAGESIZE
> 		ctx.pagesize = get_page_size();
> #endif
> 
> But the function get_page_size() doesn't exist and has never existed as
> far as I can tell. The file includes meta.h which includes glue.h which
> ensures that PAGESIZE is always define so as far as I can tell this
> code has never been compiled.
> 
> Now my question is if that code should be used or if that code (and also
> ctx.pagesize from the struct) should be removed?

No, it should not be removed. The glue.h you're looking at is defining
a glue for musl-libc-internal use of mallocng whereby things will be
namespace-safe to the rules for being in libc and use the proper
internal facilities. If you wanted to integrate mallocng with
something else or use it standalone, you'd define a glue.h suitable
for that environment, possibly including your own definition of
get_page_size if needed.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.