public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/arm/morello/main] cheri: malloc: align up without breaking capability in memalign
@ 2022-11-23 14:46 Szabolcs Nagy
  0 siblings, 0 replies; 4+ messages in thread
From: Szabolcs Nagy @ 2022-11-23 14:46 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3244a1fc1981694d582d7afbdc7e8e283530d485

commit 3244a1fc1981694d582d7afbdc7e8e283530d485
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date:   Tue Mar 15 09:54:59 2022 +0000

    cheri: malloc: align up without breaking capability in memalign

Diff:
---
 malloc/malloc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/malloc/malloc.c b/malloc/malloc.c
index 062ca0dc0a..02df29d2ad 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -4982,8 +4982,7 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
                 we can move to the next aligned spot -- we've allocated enough
                 total room so that this is always possible.
                  */
-      brk = (char *) mem2chunk (((unsigned long) (m + alignment - 1)) &
-                                - ((signed long) alignment));
+      brk = (char *) mem2chunk (m + alignment - ((unsigned long) (m) % alignment));
       if ((unsigned long) (brk - (char *) (p)) < MINSIZE)
         brk += alignment;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [glibc/arm/morello/main] cheri: malloc: align up without breaking capability in memalign
@ 2022-10-27 13:56 Szabolcs Nagy
  0 siblings, 0 replies; 4+ messages in thread
From: Szabolcs Nagy @ 2022-10-27 13:56 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0ca08c2c7b100baaebbd60744110102611f9b895

commit 0ca08c2c7b100baaebbd60744110102611f9b895
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date:   Tue Mar 15 09:54:59 2022 +0000

    cheri: malloc: align up without breaking capability in memalign

Diff:
---
 malloc/malloc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/malloc/malloc.c b/malloc/malloc.c
index 062ca0dc0a..02df29d2ad 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -4982,8 +4982,7 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
                 we can move to the next aligned spot -- we've allocated enough
                 total room so that this is always possible.
                  */
-      brk = (char *) mem2chunk (((unsigned long) (m + alignment - 1)) &
-                                - ((signed long) alignment));
+      brk = (char *) mem2chunk (m + alignment - ((unsigned long) (m) % alignment));
       if ((unsigned long) (brk - (char *) (p)) < MINSIZE)
         brk += alignment;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [glibc/arm/morello/main] cheri: malloc: align up without breaking capability in memalign
@ 2022-10-26 15:18 Szabolcs Nagy
  0 siblings, 0 replies; 4+ messages in thread
From: Szabolcs Nagy @ 2022-10-26 15:18 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=281929afda989a938a1fec31613c1c548ceecbaa

commit 281929afda989a938a1fec31613c1c548ceecbaa
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date:   Tue Mar 15 09:54:59 2022 +0000

    cheri: malloc: align up without breaking capability in memalign

Diff:
---
 malloc/malloc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/malloc/malloc.c b/malloc/malloc.c
index 062ca0dc0a..02df29d2ad 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -4982,8 +4982,7 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
                 we can move to the next aligned spot -- we've allocated enough
                 total room so that this is always possible.
                  */
-      brk = (char *) mem2chunk (((unsigned long) (m + alignment - 1)) &
-                                - ((signed long) alignment));
+      brk = (char *) mem2chunk (m + alignment - ((unsigned long) (m) % alignment));
       if ((unsigned long) (brk - (char *) (p)) < MINSIZE)
         brk += alignment;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [glibc/arm/morello/main] cheri: malloc: align up without breaking capability in memalign
@ 2022-08-05 19:35 Szabolcs Nagy
  0 siblings, 0 replies; 4+ messages in thread
From: Szabolcs Nagy @ 2022-08-05 19:35 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4064e7a4fc027aef0f023dc93fe436a512b1aaf9

commit 4064e7a4fc027aef0f023dc93fe436a512b1aaf9
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date:   Tue Mar 15 09:54:59 2022 +0000

    cheri: malloc: align up without breaking capability in memalign

Diff:
---
 malloc/malloc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/malloc/malloc.c b/malloc/malloc.c
index 062ca0dc0a..02df29d2ad 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -4982,8 +4982,7 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
                 we can move to the next aligned spot -- we've allocated enough
                 total room so that this is always possible.
                  */
-      brk = (char *) mem2chunk (((unsigned long) (m + alignment - 1)) &
-                                - ((signed long) alignment));
+      brk = (char *) mem2chunk (m + alignment - ((unsigned long) (m) % alignment));
       if ((unsigned long) (brk - (char *) (p)) < MINSIZE)
         brk += alignment;


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-23 14:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-23 14:46 [glibc/arm/morello/main] cheri: malloc: align up without breaking capability in memalign Szabolcs Nagy
  -- strict thread matches above, loose matches on Subject: below --
2022-10-27 13:56 Szabolcs Nagy
2022-10-26 15:18 Szabolcs Nagy
2022-08-05 19:35 Szabolcs Nagy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).