tcpdump mailing list archives
Re: libpcap: fatal flex scanner internal error--end of buffer missed
From: Guy Harris <guy () alum mit edu>
Date: Tue, 7 Jun 2016 10:11:58 -0700
On Jun 7, 2016, at 6:02 AM, ikuzar RABE <ikuzar9295 () gmail com> wrote:
I catched the segfault with gdb. This time I put tcp as filter: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff6125700 (LWP 5304)] 0x00007ffff772ddcb in pcap_lex () at scanner.c:3860 3860 scanner.c: No such file or directory. (gdb) bt #0 0x00007ffff772ddcb in pcap_lex () at scanner.c:3860 #1 0x00007ffff772e939 in pcap_parse () at y.tab.c:1978 #2 0x00007ffff771d6f5 in pcap_compile (p=0x12154300, program=program@entry=0x7ffff6124dc0, buf=0x7fffffffe270 "tcp", optimize=optimize@entry=0, mask=mask@entry=0) at ./gencode.c:463 #3 0x00000000004022ce in capture_packet (param=0xe20060) at ../src/capture.c:111 #4 0x00007ffff79540a4 in start_thread (arg=0x7ffff6125700) at pthread_create.c:309 #5 0x00007ffff744804d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
The only version of pcap_compile() that's thread-safe is the version in the master branch of libpcap, which is not in any release yet. Are you using pcap_compile() in multiple threads, so that it could be running in more than one thread at the same time? What does "thread apply all bt" print in the case where you get a segmentation fault? _______________________________________________ tcpdump-workers mailing list tcpdump-workers () lists tcpdump org https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers
Current thread:
- libpcap: fatal flex scanner internal error--end of buffer missed ikuzar RABE (Jun 06)
- Re: libpcap: fatal flex scanner internal error--end of buffer missed ikuzar RABE (Jun 07)
- Re: libpcap: fatal flex scanner internal error--end of buffer missed Guy Harris (Jun 07)
- Re: libpcap: fatal flex scanner internal error--end of buffer missed ikuzar RABE (Jun 07)