[Tarantool-patches] [PATCH luajit 5/6] test: fix lj-802-panic-at-mcode-protfail GCC+ASan

Sergey Bronnikov sergeyb at tarantool.org
Tue Mar 26 18:22:04 MSK 2024


Sergey,

On 3/26/24 13:08, Sergey Kaplun wrote:
> Hi, Sergey!
> Thanks for the patch!
> LGTM, except 2 typos regarding the commit message and the comment.
>
> On 26.03.24, Sergey Bronnikov wrote:
>> From: Sergey Kaplun <skaplun at tarantool.org>
>>
>> The aforementioned test uses `LD_PRELOAD` to mock the system call to
>> `mprotect()`. The GCC implementation of libasan requires that the ASan
>> library go first in the `LD_PRELOAD` list. This patch tweaks the
>> behaviour to avoid failure of the test. OTOH, this patch intorduces
> Typo: s/intorduces/introduces/
> Fixed.

>> warnings related to the libc leaks for a couple of tests, but they are
>> not treated as test failures. This should be fixed by target setting
>> LD_PRELOAD only for necessary tests when we start using CTest instead of
>> `prove`.
>>
>> Part of tarantool/tarantool#9656
>>
>> Co-authored-by: Sergey Bronnikov <sergeyb at tarantool.org>
>> ---
>>   test/tarantool-tests/CMakeLists.txt | 15 +++++++++++++++
>>   test/tarantool-tests/utils/exec.lua | 14 ++++++++++++++
>>   2 files changed, 29 insertions(+)
>>
>> diff --git a/test/tarantool-tests/CMakeLists.txt b/test/tarantool-tests/CMakeLists.txt
>> index e6d12984..35bcc5ef 100644
>> --- a/test/tarantool-tests/CMakeLists.txt
>> +++ b/test/tarantool-tests/CMakeLists.txt
>> @@ -110,6 +110,21 @@ else()
>>     list(APPEND LUA_TEST_ENV_MORE LD_LIBRARY_PATH=${LD_LIBRARY_PATH})
>>   endif()
>>   
>> +# Some tests use `LD_PRELOAD` to mock system calls (like
>> +# <lj-802-panic-at-mcode-protfail.test.lua> overwrites
>> +# `mprotect()`. When compiling with ASan support under GCC, it is
>> +# required that the ASan library go first in the `LD_PRELOAD`
>> +# list. Set it manually, test will append it to the executed
> Typo: s/manually, test/manually. The test/
>
Fixed.
>> +# process.
>> +# See also: https://github.com/tarantool/tarantool/issues/9656.
> <snipped>
>
>> -- 
>> 2.34.1
>>


More information about the Tarantool-patches mailing list