Skip to content

Hide symbols that are not meant ot be public #79

@mattip

Description

@mattip

Over at numpy/numpy#21643 it turns out that when we use SYMBOLSUFFIX not all the exported symbols are converted. For instance, in NumPy 1.22.4, we have cblas_dgemm64_ calling dgemm_nn which does not have the 64_ suffix:

$ objdump /tmp/venv/lib/python3.10/site-packages/numpy.libs/libopenblas64_p-r0-2f7c42d4.3.18.so -T | grep dgemm_nn
00000000001fdb40 g    DF .text	0000000000000638  Base        dgemm_nn

This is problematic if there is a different openblas.so already loaded into the process. The first one's symbols (which could be using a 32-bit interface) will be used, which can segfault.

Should we be adding `CFLAGS=-fvisibility=hidden to our builds?

@martin-frbg thoughts?

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