Переписываюсь с майнтейнером minicom, по поводу бага:
Hi,
> >> Hi, i want connect to /dev/ttyUSB0 as User (group dialout). I run command in «KDE4 konsole» : minicom -D /dev/ttyUSB0 -b 115200, minicom answer me «segmentation fault».
> >> The contents of the «dmesg» :
> >> [293718.195129] minicom[26808]: segfault at 0 ip b759fca1 sp bf9b3030 error 6 in libc-2.15.so[b7538000+17e000].
> >> lsusb:
> >> Bus 002 Device 004: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
> >> cat /etc/slackware-version
> >> Slackware 14.0
> >
> >Thanks for the report. Could you run minicom with gdb to get a backtrace
> >of the segfault? What would be needed to get more details on the
> >segfault.
> >You are running minicom-2.6-i486-1?
> >
> >
> >Adam
> >--
> >Adam adam____os.inf.tu-dresden.de
> > Lackorzynski http://os.inf.tu-dresden.de/~adam/
>
> Sorry for my terrible English.
>
> Okay. I hope I did it right. Version minicom 2.6-i486- 1 a standard binary package Slakware 14 .
Looks good. The strace is even more interesting.
> GDB result :
> Starting program: /usr/bin/minicom
> warning: Could not load shared library symbols for linux-gate.so.1.
> Do you need «set solib-search-path» or «set sysroot»?
> Program received signal SIGSEGV, Segmentation fault.
> 0xb7e50ca1 in _IO_getline_info_internal () from /lib/libc.so.6
Please type 'bt' to get a backtrace here.
> strace result:
> splinter@bastile:~/mywork/boiler$ tail -30 ~/source/Debug/minicom_strace.txt
> read(3, "", 4096) = 0
> _llseek(3, 0, [0], SEEK_SET) = 0
> read(3, «# Machine-generated file - use m»..., 4096) = 38
> read(3, "", 4096) = 0
> _llseek(3, 0, [0], SEEK_SET) = 0
> read(3, «# Machine-generated file - use m»..., 4096) = 38
> read(3, "", 4096) = 0
> _llseek(3, 0, [0], SEEK_SET) = 0
> read(3, «# Machine-generated file - use m»..., 4096) = 38
> read(3, "", 4096) = 0
> _llseek(3, 0, [0], SEEK_SET) = 0
> read(3, «# Machine-generated file - use m»..., 4096) = 38
> read(3, "", 4096) = 0
> _llseek(3, 0, [0], SEEK_SET) = 0
> mremap(0x5d408000, 1509945344, 1509949440, MREMAP_MAYMOVE) = -1 ENOMEM (Cannot allocate memory)
> mmap2(NULL, 1509949440, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
> brk(0x63d35000) = 0x9d36000
> mmap2(NULL, 1510080512, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
> time(NULL) = 1357458514
> open(«/sys/devices/system/cpu/online», O_RDONLY|O_CLOEXEC) = 4
> read(4, «0-1\n», 8192) = 4
> close(4) = 0
> mmap2(NULL, 2097152, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0x5d208000
> munmap(0x5d208000, 1015808) = 0
> munmap(0x5d400000, 32768) = 0
> mprotect(0x5d300000, 135168, PROT_READ|PROT_WRITE) = 0
> mmap2(NULL, 1509949440, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
> read(3, «# Machine-generated file - use m»..., 4096) = 38
> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> +++ killed by SIGSEGV +++
>
> Full log strace send can not. Its size is larger than 2 GB.
The absolutely astonishing thing are the numbers in the mmap and mremap
calls, those with the ENOMEM return codes. They try to handle around
1.5GB of memory, which fails (and it's ok that this fails).
Since minicom itself does not use mmap/mremap itself, this must come out
of the libc and could be the memory pool, e.g. for malloc.
Can you please describe in more detail what you are doing and what leads
to that memory situation?
>Please type 'bt' to get a backtrace here.
Я что то нифига ни в gdb ни minicom подобного найти не смог, помогите понять что требуется.