This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug malloc/20137] New: aligned_alloc should fail for bad size / alignment [DR#460]


https://sourceware.org/bugzilla/show_bug.cgi?id=20137

            Bug ID: 20137
           Summary: aligned_alloc should fail for bad size / alignment
                    [DR#460]
           Product: glibc
           Version: 2.23
            Status: NEW
          Severity: normal
          Priority: P2
         Component: malloc
          Assignee: unassigned at sourceware dot org
          Reporter: jsm28 at gcc dot gnu.org
  Target Milestone: ---

The resolution to C11 DR#460 requires aligned_alloc to return NULL if the
alignment is not valid (not a power of 2, in our case) or the size is not a
multiple of the alignment.  This needs to be implemented.

For compatibility with existing binaries, I think we should have a compat
symbol for aligned_alloc that remains as an alias to memalign (whose semantics
should remain unchanged), and implement the stricter semantics only at a new
symbol version.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]