Closed Bug 1629324 Opened 6 years ago Closed 3 years ago

--enable-address-sanitizer doesn't work on FreeBSD

Categories

(Core :: Sanitizers, defect, P3)

Unspecified
FreeBSD
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: jbeich, Unassigned)

Details

-fsanitize=address works fine but not in Firefox.

$ echo 'export CC=clang10 CXX=clang++10'  >>.mozconfig

$ echo 'ac_add_options --enable-address-sanitizer' >>.mozconfig
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238404
$ echo 'export ac_cv_func_pthread_getname_np=no'  >>.mozconfig

$ ./mach bootstrap
$ ./mach build
$ ./mach run
 0:00.31 objdir/dist/bin/firefox -no-remote -profile objdir/tmp/profile-default
AddressSanitizer:DEADLYSIGNAL
=================================================================
==52908==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000ff0 (pc 0x000001077b8a bp 0x000000000000 sp 0x7fffffff5000 T0)
==52908==The signal is caused by a WRITE memory access.
==52908==Hint: address points to the zero page.
    #0 0x1077b8a in atomic_compare_exchange_strong<__sanitizer::atomic_uint8_t> /usr/ports/devel/llvm10/work/compiler-rt-10.0.0.src/lib/asan/../sanitizer_common/sanitizer_atomic_clang.h:80:10
    #1 0x1077b8a in AtomicallySetQuarantineFlagIfAllocated /usr/ports/devel/llvm10/work/compiler-rt-10.0.0.src/lib/asan/asan_allocator.cpp:570:10
    #2 0x1077b8a in __asan::Allocator::Deallocate(void*, unsigned long, unsigned long, __sanitizer::BufferedStackTrace*, __asan::AllocType) /usr/ports/devel/llvm10/work/compiler-rt-10.0.0.src/lib/asan/asan_allocator.cpp:647:10

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /usr/ports/devel/llvm10/work/compiler-rt-10.0.0.src/lib/asan/../sanitizer_common/sanitizer_atomic_clang.h:80:10 in atomic_compare_exchange_strong<__sanitizer::atomic_uint8_t>
==52908==ABORTING
Component: General: Unsupported Platforms → Sanitizers
Product: Firefox Build System → Core

The priority flag is not set for this bug.
:decoder, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(choller)

I don't know a whole lot about FreeBSD, but could you try with some of the options that we use for building ASan? In particular try these:

ac_add_options --disable-jemalloc
ac_add_options --disable-crashreporter
ac_add_options --disable-profiling

If you still get the crash, please try to get a more comprehensive stack in GDB or another debugger. Sometimes that works to get more information.

Flags: needinfo?(choller) → needinfo?(jbeich)
Priority: -- → P3

Redirect a needinfo that is pending on an inactive user to the triage owner.
:decoder, since the bug doesn't have a severity set, could you please set the severity or close the bug?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jbeich) → needinfo?(choller)
Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(choller)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.