Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jan 2022 14:59:58 -0800
From:      Mark Millard <marklmi@yahoo.com>
To:        freebsd-current <freebsd-current@freebsd.org>
Subject:   The kyua in ASAN-built-world reports: the 65 __asan_report_{load4|store8|load8}_noabort examples
Message-ID:  <604B4A79-EF86-49A9-9AF0-13716EE8D7EB@yahoo.com>
References:  <604B4A79-EF86-49A9-9AF0-13716EE8D7EB.ref@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
# kyua report --verbose | grep _noabort=20
    #7 0x1111227 in __asan_report_load4_noabort =
/usr/main-src/contrib/llvm-project/compiler-rt/lib/asan/asan_rtl.cpp:122:1=

    #7 0x111163a in __asan_report_store8_noabort =
/usr/main-src/contrib/llvm-project/compiler-rt/lib/asan/asan_rtl.cpp:128:1=

. . .
    #7 0x10ce357 in __asan_report_load8_noabort =
/usr/main-src/contrib/llvm-project/compiler-rt/lib/asan/asan_rtl.cpp:123:1=

. . .

(The others are examples of the same 3 routines. In fact there is
only that one _load4_ example in the list. The rest are _load8_ or
_store8_ examples.)

But when I look, I find that all of these fail to actually report the
load* or store* information, instead running into another problem while
trying to do that. It is this other problem that ends up being reported.
It is the same problem for all of them.

Picking an example:

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
AddressSanitizer: CHECK failed: asan_thread.cpp:371 "((ptr[0] =3D=3D =
kCurrentStackFrameMagic)) !=3D (0)" (0x0, 0x0) (tid=3D102427)
    #0 0x1112b31 in __asan::CheckUnwind() =
/usr/main-src/contrib/llvm-project/compiler-rt/lib/asan/asan_rtl.cpp:67:3
    #1 0x112e00b in __sanitizer::CheckFailed(char const*, int, char =
const*, unsigned long long, unsigned long long) =
/usr/main-src/contrib/llvm-project/compiler-rt/lib/sanitizer_common/saniti=
zer_termin
ation.cpp:86:5
    #2 0x11153c1 in =
__asan::AsanThread::GetStackFrameAccessByAddr(unsigned long, =
__asan::AsanThread::StackFrameAccess*) =
/usr/main-src/contrib/llvm-project/compiler-rt/lib/asan/asan_thread.cpp
    #3 0x10bc5a3 in __asan::GetStackAddressInformation(unsigned long, =
unsigned long, __asan::StackAddressDescription*) =
/usr/main-src/contrib/llvm-project/compiler-rt/lib/asan/asan_descriptions.=
cpp:202
:11
    #4 0x10bc5a3 in =
__asan::AddressDescription::AddressDescription(unsigned long, unsigned =
long, bool) =
/usr/main-src/contrib/llvm-project/compiler-rt/lib/asan/asan_descriptions.=
cpp:454:21
    #5 0x10be09e in __asan::ErrorGeneric::ErrorGeneric(unsigned int, =
unsigned long, unsigned long, unsigned long, unsigned long, bool, =
unsigned long) /usr/main-src/contrib/llvm-project/compiler-rt/lib
/asan/asan_errors.cpp:390:7
    #6 0x11104fc in __asan::ReportGenericError(unsigned long, unsigned =
long, unsigned long, unsigned long, bool, unsigned long, unsigned int, =
bool) /usr/main-src/contrib/llvm-project/compiler-rt/lib/a
san/asan_report.cpp:475:16
    #7 0x1111227 in __asan_report_load4_noabort =
/usr/main-src/contrib/llvm-project/compiler-rt/lib/asan/asan_rtl.cpp:122:1=

. . .

In each case, __asan::AsanThread::GetStackFrameAccessByAddr attempts to =
CHECK
ptr[0] =3D=3D kCurrentStackFrameMagic and the CHECK fails --so that is =
what ends
up being reported.

My first guess would be that the load* and store* reports are for
misaligned stack accesses. But it is just a guess from my lack of
managing to think of anything else it would be checking where the
only context-usage apparently involved is: load or store with a size
in Bytes.

=3D=3D=3D
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?604B4A79-EF86-49A9-9AF0-13716EE8D7EB>