https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124248

            Bug ID: 124248
           Summary: struct_sock_fprog_sz in ASAN only provided on glibc
           Product: gcc
           Version: 15.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marian.buschsieweke at posteo dot net
                CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
                    jakub at gcc dot gnu.org, kcc at gcc dot gnu.org
  Target Milestone: ---

Created attachment 63787
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63787&action=edit
proposed fix

Compiling with `-fsanitize=address` fails on Linux+musl with:

    libasan.so: undefined reference to `__sanitizer::struct_sock_fprog_sz'

`struct sock_fprog` is provided by `#include <linux/filter.h>` and not by
glibc, so there is no reason to restrict providing `struct_sock_fprog_sz' to
glibc systems only.

The attached patch fixes the issue.

Reply via email to