This is a strange problem OR I am doing something horribly wrong.
I am using multiple threads to read a pcap file using pcap_next. Since
the pcap routines arent MT-safe, I have made sure to use sync
variables wherever I have used those routines.
I am using gcc.
The problem is, I get a segmentation fault on pcap_compile whenever I
compile without the -O flag. However, there is no segmentation fault
if I use the -O flag. pcap_open_offline however, works irrespective of
whether I am using the -O flag.
Ive never had this problem when my progams werent MTd.
Any pointers why this is so?
**I am hoping this is the right group to post this in**