Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix python syntax warnings #3191

Merged
merged 3 commits into from
Feb 25, 2025
Merged

fix python syntax warnings #3191

merged 3 commits into from
Feb 25, 2025

Conversation

neheb
Copy link
Collaborator

@neheb neheb commented Feb 23, 2025

Also remove std::isprint. This is impacted by locale. Unfortunately there's a lot more sections of code that seem to be impacted.

Cleanest to use raw strings.

Signed-off-by: Rosen Penev <[email protected]>
It's influenced by locale, which can cause problems.

Signed-off-by: Rosen Penev <[email protected]>
For some reason, this unused variable causes thread sanitizer to
complain on destruction of the std::string. Simple enough to remove.

Signed-off-by: Rosen Penev <[email protected]>
@neheb
Copy link
Collaborator Author

neheb commented Feb 23, 2025

@kevinbackhouse that last one is wild.

@kevinbackhouse
Copy link
Collaborator

I don't understand. What's this fixing?

@neheb
Copy link
Collaborator Author

neheb commented Feb 23, 2025

Thread Sanitizer error

@neheb
Copy link
Collaborator Author

neheb commented Feb 24, 2025

sample output:

[ERROR] 
[INFO] Starting HTTP server ...
[INFO] The HTTP server started
[ERROR] Failed to execute: ['/home/mangix/devstuff/exiv2/an/iotest', 's0', 's1', 's2', 'http://127.0.0.1:12760/table.jpg']
[ERROR] The asserted return code is [0], but got 66
[INFO] OUTPUT:
ThreadSanitizer:DEADLYSIGNAL
==29460==ERROR: ThreadSanitizer: SEGV on unknown address 0x7ffbfffff018 (pc 0x7fe17069cbc0 bp 0x7fe170759c80 sp 0x7ffc6bf3c120 T29460)
==29460==The signal is caused by a READ memory access.
    #0 __sanitizer::LargeMmapAllocator<__tsan::MapUnmapCallback, __sanitizer::LargeMmapAllocatorPtrArrayDynamic, __sanitizer::LocalAddressSpaceView>::Deallocate(__sanitizer::AllocatorStats*, void*) <null> (libtsan.so.2+0x9cbc0) (BuildId: c8455fafa477dccacaa74df59b23caba0427f5bf)
    #1 __tsan::user_free(__tsan::ThreadState*, unsigned long, void*, bool) <null> (libtsan.so.2+0x9bd15) (BuildId: c8455fafa477dccacaa74df59b23caba0427f5bf)
    #2 operator delete(void*, unsigned long) <null> (libtsan.so.2+0x9fc30) (BuildId: c8455fafa477dccacaa74df59b23caba0427f5bf)
    #3 std::__new_allocator<char>::deallocate(char*, unsigned long) /usr/include/c++/14/bits/new_allocator.h:172 (iotest+0x409a7a) (BuildId: fd1f9b2f78e0a03150511c452ce1cb955be1bf3c)
    #4 std::allocator<char>::deallocate(char*, unsigned long) /usr/include/c++/14/bits/allocator.h:208 (iotest+0x4088df) (BuildId: fd1f9b2f78e0a03150511c452ce1cb955be1bf3c)
    #5 std::allocator_traits<std::allocator<char> >::deallocate(std::allocator<char>&, char*, unsigned long) /usr/include/c++/14/bits/alloc_traits.h:513 (iotest+0x4088df)
    #6 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_destroy(unsigned long) /usr/include/c++/14/bits/basic_string.h:294 (iotest+0x4088df)
    #7 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose() /usr/include/c++/14/bits/basic_string.h:288 (iotest+0x40853f) (BuildId: fd1f9b2f78e0a03150511c452ce1cb955be1bf3c)
    #8 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string() /usr/include/c++/14/bits/basic_string.h:809 (iotest+0x40795f) (BuildId: fd1f9b2f78e0a03150511c452ce1cb955be1bf3c)
    #9 Exiv2::CurlIo::CurlImpl::getFileLength() ../src/basicio.cpp:1595 (libexiv2.so.30+0x34c4dd) (BuildId: 84c783f6ca97de70fc87a409e736d0717c31ab3e)
    #10 Exiv2::RemoteIo::open() ../src/basicio.cpp:1093 (libexiv2.so.30+0x348bc0) (BuildId: 84c783f6ca97de70fc87a409e736d0717c31ab3e)
    #11 main ../samples/iotest.cpp:49 (iotest+0x40573a) (BuildId: fd1f9b2f78e0a03150511c452ce1cb955be1bf3c)
    #12 __libc_start_call_main <null> (libc.so.6+0x2a087) (BuildId: c8c3fa52aaee3f5d73b6fd862e39e9d4c010b6ba)
    #13 __libc_start_main_impl <null> (libc.so.6+0x2a14a) (BuildId: c8c3fa52aaee3f5d73b6fd862e39e9d4c010b6ba)
    #14 _start <null> (iotest+0x405414) (BuildId: fd1f9b2f78e0a03150511c452ce1cb955be1bf3c)

ThreadSanitizer can not provide additional info.
SUMMARY: ThreadSanitizer: SEGV (/lib64/libtsan.so.2+0x9cbc0) (BuildId: c8455fafa477dccacaa74df59b23caba0427f5bf) in __sanitizer::LargeMmapAllocator<__tsan::MapUnmapCallback, __sanitizer::LargeMmapAllocatorPtrArrayDynamic, __sanitizer::LocalAddressSpaceView>::Deallocate(__sanitizer::AllocatorStats*, void*)
==29460==ABORTING

@neheb neheb requested a review from kmilos February 25, 2025 00:28
@neheb neheb merged commit 92d711e into Exiv2:main Feb 25, 2025
60 checks passed
@neheb neheb deleted the 4 branch February 25, 2025 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants