Page MenuHomeFreeBSD

Allow building usr.bin/vi with MK_ASAN
ClosedPublic

Authored by arichardson on Jul 5 2021, 12:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 25, 10:56 PM
Unknown Object (File)
Mon, Mar 25, 11:38 AM
Unknown Object (File)
Fri, Mar 22, 6:20 PM
Unknown Object (File)
Fri, Mar 22, 6:20 PM
Unknown Object (File)
Fri, Mar 22, 6:20 PM
Unknown Object (File)
Mar 10 2024, 1:54 AM
Unknown Object (File)
Jan 26 2024, 10:45 AM
Unknown Object (File)
Jan 2 2024, 7:35 PM
Subscribers

Details

Summary

We have to namespace the regex functions to avoid duplicate symbol errors.
This also ensures that vi doesn't define the libc reg* functions with
mismatched signatures.

ld: error: duplicate symbol: regcomp

defined at sanitizer_common_interceptors.inc:7519 (/usr/src/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:7519)

asan_interceptors.o:(__interceptor_regcomp) in archive /usr/lib/clang/10.0.1/lib/freebsd/libclang_rt.asan-x86_64.a

defined at regcomp.c

.../regex/regcomp.c.o:(.text+0x0)

ld: error: duplicate symbol: regerror

defined at sanitizer_common_interceptors.inc:7543 (/usr/src/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:7543)

asan_interceptors.o:(__interceptor_regerror) in archive /usr/lib/clang/10.0.1/lib/freebsd/libclang_rt.asan-x86_64.a

defined at regerror.c

.../regex/regerror.c.o:(.text+0x0)

ld: error: duplicate symbol: regexec

defined at sanitizer_common_interceptors.inc:7530 (/usr/src/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:7530)

asan_interceptors.o:(__interceptor_regexec) in archive /usr/lib/clang/10.0.1/lib/freebsd/libclang_rt.asan-x86_64.a

defined at regexec.c

.../regex/regexec.c.o:(.text+0x0)

ld: error: duplicate symbol: regfree

defined at sanitizer_common_interceptors.inc:7553 (/usr/src/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:7553)

asan_interceptors.o:(__interceptor_regfree) in archive /usr/lib/clang/10.0.1/lib/freebsd/libclang_rt.asan-x86_64.a

defined at regfree.c

.../regex/regfree.c.o:(.text+0x0)

Submitted upstream as https://github.com/lichray/nvi2/pull/92

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 40302
Build 37191: arc lint + arc unit

Event Timeline

@bapt This has now been committed upstream, should I commit this locally first or wait for the next import?

just commit it now, thank you for it!

This revision is now accepted and ready to land.Jul 19 2021, 12:54 PM
This revision was automatically updated to reflect the committed changes.