Thanks to visit codestin.com
Credit goes to github.com

Skip to content

On ppc64, malloc gives misaligned buffers for glibc <= 2.23. #10491

Open
@ahaldane

Description

@ahaldane

On ppc64 and ppc64le systems, glibc 2.23-or-less has a bug in malloc, that it only guarantees alignment to 8 bytes, even though it should be 16 bytes.

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

This is a problem for the long-double (float128) and sometimes complex128 type which should be aligned to 16 bytes. This means that when using long-double arrays, many internal numpy computations will randomly fail on ppc64, depending on what alignment malloc returned. This causes sporadic numpy unit test failures and sometimes outright crashes. The test numpy.core.tests.test_numeric TestRequire.test_require_each commonly fails, though not consistently.

Users on ppc64 should upgrade to glibc 2.24 or later.

(Discovered in #10443)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions