slazav / mapsoft2

Programs for map handling, based on mapsoft2-libs
https://slazav.github.io/mapsoft2/
GNU General Public License v3.0
6 stars 1 forks source link

Падает tmpdir.test при сборке #48

Closed ioctl-user closed 4 years ago

ioctl-user commented 4 years ago

Вывод gdb:

(gdb) run f1 f2 f3 a/ a/b/c/f4 a/f5 tmp.zip Starting program: /home/ioctl/delme/mapsoft2/modules/tmpdir/tmpdir.test f1 f2 f3 a/ a/b/c/f4 a/f5 tmp.zip /usr/lib/../share/gcc-9.2.0/python/libstdcxx/v6/xmethods.py:731: SyntaxWarning: list indices must be integers or slices, not str; perhaps you missed a comma? refcounts = ['_M_refcount']['_M_pi'] terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_M_construct null not valid

Program received signal SIGABRT, Aborted. 0x00007ffff7ab0f25 in raise () from /usr/lib/libc.so.6 (gdb) bt

0 0x00007ffff7ab0f25 in raise () from /usr/lib/libc.so.6

1 0x00007ffff7a9a897 in abort () from /usr/lib/libc.so.6

2 0x00007ffff7e3281d in __gnu_cxx::__verbose_terminate_handler ()

at /build/gcc/src/gcc/libstdc++-v3/libsupc++/vterminate.cc:95

3 0x00007ffff7e3f4da in cxxabiv1::terminate (handler=)

at /build/gcc/src/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:47

4 0x00007ffff7e3f537 in std::terminate ()

at /build/gcc/src/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:57

5 0x00007ffff7e3f78e in cxxabiv1::cxa_throw (

obj=obj@entry=0x55555558cc60, 
tinfo=0x7ffff7f783c8 <typeinfo for std::logic_error>, 
dest=0x7ffff7e55830 <std::logic_error::~logic_error()>)
at /build/gcc/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc:95

6 0x00007ffff7e35287 in std::__throw_logic_error (

__s=0x55555555c008 "basic_string::_M_construct null not valid")
at /build/gcc/src/gcc/libstdc++-v3/src/c++11/functexcept.cc:66

7 0x000055555555b2db in void std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_construct<char const>(char const, char const*, std::forward_iterator_tag) ()

8 0x0000555555559886 in TmpDir::TmpDir(char const*) ()

9 0x000055555555807d in main ()

slazav commented 4 years ago

Понятно, ошибка возникает, если переменная окружения TMPDIR не определена. Исправлю.

slazav commented 4 years ago

исправлено в https://github.com/slazav/mapsoft2-libs/commit/9ff8f18112bd6b524e029ca438ed11a2c8487ee1