[Aptitude-devel] Bug#859907: aptitude: crashes with SIGABRT on changelog download if $LANG contains an invalid value
Manuel A. Fernandez Montecelo
manuel.montezelo at gmail.com
Thu Apr 13 23:14:37 UTC 2017
Control: tags -1 + pending
2017-04-09 06:13 Axel Beckert:
>I just ran into a corner case which causes a crash of aptitude:
>→ env LANG=foobar aptitude changelog aptitude
>terminate called after throwing an instance of 'std::runtime_error'
> what(): locale::facet::_S_create_c_locale name not valid
> 10697 abort (core dumped) env LANG=foobar aptitude changelog aptitude
>The crash can be triggered with both, trying to download a changelog
>from within the TUI (by pressing "C") or from the commandline as shown
This happens due to the internal implementation of Boost, when creating
a temporary dir to save the changelog.
When the locale is invalid we default to the C locale, but it seems that
Boost again tries to use the invalid locale for some reason.
I added some code to warn about the locale being invalid in such cases,
but there's only so much that we can do in these situations, since it's
not even possible to get clues from glibc about which locales might be
wrong to point the users in the right direction (it seems that it's an
area which is heavily implementation-dependent and other libc-s follow
So essentially the message is a bit clearer than
"locale::facet::_S_create_c_locale name not valid", but that's about it.
Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>
More information about the Aptitude-devel