zxing-cpp / zxing-cpp

C++ port of ZXing
Apache License 2.0
1.32k stars 413 forks source link

crash with clang build and activated memory sanitizer on Fedora 41 #868

Open a3emdot opened 2 weeks ago

a3emdot commented 2 weeks ago

Hi there,

I can reproduce a crash with the attached bash script and upca.png file. For attachment purposes the two files were put into a .tar.gz archive.

The crash happens on a recently updated Fedora 41 installation. To be able to use clang with the memory sanitizer I see the following installed packages.

user@fedora:~/tmp$ rpm -qa | grep -e "san" | grep -v -e "sans"
libasan-14.2.1-3.fc41.x86_64
liblsan-14.2.1-3.fc41.x86_64
libubsan-14.2.1-3.fc41.x86_64
libubsan-static-14.2.1-3.fc41.x86_64
liblsan-static-14.2.1-3.fc41.x86_64
libasan-static-14.2.1-3.fc41.x86_64
user@fedora:~/tmp$ rpm -qa | grep -e "clang"
clang-resource-filesystem-19.1.0-1.fc41.x86_64
clang-libs-19.1.0-1.fc41.x86_64
clang-19.1.0-1.fc41.x86_64
clang-analyzer-19.1.0-1.fc41.noarch
clang-tools-extra-19.1.0-1.fc41.x86_64

Simply make a new directory, and copy the bash script and png file into it. Then execute the shell script from within this new directory.

Kind regards Andre

reproducer.tar.gz reproducer.log

a3emdot commented 1 day ago

@axxel I would like to ask if you can confirm the crash, because using the C++-API I do have a different one, but i think the second one is currently masked by the one I reported if the test tool is used.

axxel commented 22 hours ago

Thanks for bringing this back to my attention... I can reproduce the issue but it does not make much sense. A bit of googling revealed this exact match: https://github.com/google/sanitizers/issues/650.

a3emdot commented 4 hours ago

I see.

For completeness I have added a log from a test run of my zint, zxing-cpp integration demo project, https://github.com/a3emdot/zintzxingcppdemo/commits/main

The log shows the other crash I wanted to sort out, without the Red Black Tree entry points from std::map in it, as seen from the first crash reported ;-) LastTest.log