Re: BUG #18483: Segmentation fault in tests modules - Mailing list pgsql-bugs

From Alexander Lakhin
Subject Re: BUG #18483: Segmentation fault in tests modules
Date
Msg-id d959bd09-3bce-6a5e-7ae0-dff761f8ad81@gmail.com
Whole thread Raw
In response to Re: BUG #18483: Segmentation fault in tests modules  (Michael Paquier <michael@paquier.xyz>)
Responses Re: BUG #18483: Segmentation fault in tests modules
List pgsql-bugs
Hello Michael,

10.06.2024 08:50, Michael Paquier wrote:
> On Sun, Jun 09, 2024 at 03:00:00PM +0300, Alexander Lakhin wrote:
>> 2)
>> echo "
>> select test_enc_conversion('\x8bc68bcf8b', 'gb18030', 'gb18030', false);
>> " >> src/test/regress/sql/conversion.sql
>> TESTS="conversion" make -s check-tests
>>
>> produces (under Valgrind):
>> ==00:00:00:05.947 3320530== Invalid read of size 1
>> ==00:00:00:05.947 3320530==    at 0x6F21E5: pg_gb18030_mblen (wchar.c:1000)
>> ==00:00:00:05.947 3320530==    by 0x6F2BA0: pg_encoding_mblen (wchar.c:2072)
>> ==00:00:00:05.947 3320530==    by 0x6B4EAF: report_invalid_encoding (mbutils.c:1700)
>> ==00:00:00:05.947 3320530==    by 0x4867D3F: test_enc_conversion (regress.c:1154)
>> ==00:00:00:05.947 3320530==    by 0x3B9796: ExecInterpExpr (execExprInterp.c:764)
>>
>> If I understand correctly, the defect is inside test_enc_conversion(), not
>> in the core code.
> Interesting, I cannot see this one, did you use a specific option with
> valgrind?

Thanks for your interest to it!

My Valgrind-testing procedure is:
git apply .../install-vrunner.patch # use the attached
CPPFLAGS="-Og -DUSE_VALGRIND" ./configure -q && make -j8 -s

echo "
select test_enc_conversion('\x8bc68bcf8b', 'gb18030', 'gb18030', false);
" >> src/test/regress/sql/conversion.sql
TESTS="conversion" make -s check-tests

not ok 1     - conversion                               3189 ms
# (test process exited with exit code 2)

Best regards,
Alexander
Attachment

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: BUG #18333: Postgres is crashing if we have special character in the query
Next
From: HAQ LATIF
Date:
Subject: Re: BUG #18391: not able to create a new cluster using init db on rocky linux.We are forced to download version 1 3