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

FreeBSD bus error in boost::locale::conv when charmap is not set #44

Open
lambdafu opened this issue Dec 16, 2017 · 2 comments
Open

FreeBSD bus error in boost::locale::conv when charmap is not set #44

lambdafu opened this issue Dec 16, 2017 · 2 comments

Comments

@lambdafu
Copy link
Collaborator

lambdafu commented Dec 16, 2017

System: FreeBSD 11.1-RELEASE (GENERIC)

[~/neopg/build]$ gdb src/neopg 
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...
(gdb) run 
Starting program: /usr/home/lambdafu/neopg/build/src/neopg 
warning: Lowest section in /usr/local/lib/libicudata.so.59 is .hash at 0000000000000120

Program received signal SIGBUS, Bus error.
0x0000000800f20155 in boost::locale::conv::impl::convert_to<wchar_t> () from /usr/local/lib/libboost_locale.so.1.64.0
(gdb) bt
#0  0x0000000800f20155 in boost::locale::conv::impl::convert_to<wchar_t> () from /usr/local/lib/libboost_locale.so.1.64.0
#1  0x0000000800f1f89d in boost::locale::conv::to_utf<wchar_t> () from /usr/local/lib/libboost_locale.so.1.64.0
#2  0x0000000800f3afb1 in boost::locale::util::simple_converter_impl::simple_converter_impl () from /usr/local/lib/libboost_locale.so.1.64.0
#3  0x0000000800f3ac23 in boost::locale::util::create_simple_codecvt () from /usr/local/lib/libboost_locale.so.1.64.0
#4  0x0000000800f3e7ac in boost::locale::impl_icu::create_codecvt () from /usr/local/lib/libboost_locale.so.1.64.0
#5  0x0000000800f49b1a in boost::locale::impl_icu::icu_localization_backend::install () from /usr/local/lib/libboost_locale.so.1.64.0
#6  0x0000000800f2d7e8 in boost::locale::localization_backend_manager::impl::actual_backend::install () from /usr/local/lib/libboost_locale.so.1.64.0
#7  0x0000000800f29b27 in boost::locale::generator::generate () from /usr/local/lib/libboost_locale.so.1.64.0
#8  0x0000000800f298fd in boost::locale::generator::generate () from /usr/local/lib/libboost_locale.so.1.64.0
#9  0x000000000068b574 in boost::locale::generator::operator() (this=0x7fffffff9608, id=@0x7fffffff95a0) at generator.hpp:202
#10 0x0000000000679f3f in setup_locale () at /usr/home/lambdafu/neopg/src/neopg.cpp:28
#11 0x000000000066eb8e in main (argc=1, argv=0x7fffffffeb18) at /usr/home/lambdafu/neopg/src/neopg.cpp:105
(gdb) 

Locale settings:

$ locale   
LANG=
LC_CTYPE="C"
LC_COLLATE="C"
LC_TIME="C"
LC_NUMERIC="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=

As a work-around, setting the charmap for LC_CTYPE to basically any value works:

$ LC_CTYPE=en_US.UTF-8 src/neopg 
NeoPG implements the OpenPGP standard.
Usage: src/neopg [OPTIONS] [SUBCOMMAND]
[...]
@fkr
Copy link
Contributor

fkr commented Dec 17, 2017

Seems to be same as this problem reported over at freebsd: https://bugs.freebsd.org/bugzilla/show_bug.cgi?format=multiple&id=222125

@lambdafu
Copy link
Collaborator Author

@frk Indeed. This is probably a bug in boost, because it doesn't happen under Linux even if I try to set the locale in the same way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants