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

Crash in email header encoding conversion on macOS Sonoma #150

Closed
lexgorbunov opened this issue Dec 14, 2023 · 2 comments
Closed

Crash in email header encoding conversion on macOS Sonoma #150

lexgorbunov opened this issue Dec 14, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@lexgorbunov
Copy link

Description:

unexpected termination: 6
0   0x0000000104ea4324  Util::SignalCrashHandler(int)
1   0x0000000185053a24  _sigtramp
2   0x0000000185024cc0  pthread_kill
3   0x0000000184f34a40  abort
4   0x0000000184f33d30  err
5   0x0000000222b22ca4  _citrus_iconv_std_iconv_convert.cold.3
6   0x0000000222b227e0  _citrus_iconv_std_iconv_convert
7   0x00000001918b6cd8  __bsd_iconv
8   0x0000000104efeca4  mail_iconv
9   0x0000000104efe9f4  charconv
a   0x0000000104ef96a4  mailmime_encoded_phrase_parse
b   0x0000000104ea6350  Util::MimeToUtf8(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)
c   0x0000000104e10940  Header::Parse()
d   0x0000000104e0fac8  Header::SetHeaderData(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, long)
e   0x0000000104e1579c  Imap::GetHeaders(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::set<unsigned int, std::__1::less<unsigned int>, std::__1::allocator<unsigned int>> const&, bool, bool, std::__1::map<unsigned int, Header, std::__1::less<unsigned int>, std::__1::allocator<std::__1::pair<unsigned int const, Header>>>&)
f   0x0000000104e3b914  ImapManager::PerformRequest(ImapManager::Request const&, bool, bool, ImapManager::Response&)
10  0x0000000104e36f80  ImapManager::Process()
11  0x0000000104e3d5ec  void* std::__1::__thread_proxy[abi:v160006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (ImapManager::*)(), ImapManager*>>(void*)
12  0x0000000185025034  _pthread_start
13  0x000000018501fe3c  thread_start

How to reproduce it:
Just run application and waiting for few seconds

Environment:
OS: Sonoma 14.1.2
Chip: Apple M1 Max

@lexgorbunov lexgorbunov added the bug Something isn't working label Dec 14, 2023
@d99kris
Copy link
Owner

d99kris commented Dec 14, 2023

Hi @lexgorbunov - thanks for reporting. It seems like a bad bug, but I need some more data to determine the root cause.

Could you help apply the attached patch nmail-charconv.patch, build nmail and try reproduce the crash again?

Once it crashes, can you share the end of your log file ~/.nmail/log.txt, likely the last line containing MimeToUtf8 before the crash callstack will be sufficient. Should the line contain data you do not wish to share here, feel free to send it via email to d99kris at gmail dot com.

To apply the patch:

# go to your clone directory for nmail
git apply ~/nmail-charconv.patch
# build nmail, ex:
./make.sh build
# run:
./build/nmail

@d99kris d99kris changed the title Crash Crash in email header character encoding conversion Dec 19, 2023
@d99kris d99kris changed the title Crash in email header character encoding conversion Crash in email header encoding conversion on macOS Sonoma Jan 7, 2024
@d99kris
Copy link
Owner

d99kris commented Jan 7, 2024

Hi again - I did some googling and it seems there are others who encountered similar issues on macOS 14.1.x and iOS 17.1.x. It appears the the issue should be fixed in 17.2, and thus likely also in macOS 14.2. I will proceed to close this issue for now, but feel free to re-open it if you still see it on macOS 14.2 (or later) and help to provide the information requested in the above comment. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants