Re: Communication between kernel and userspace via local socket

2011-11-19 Thread Julian Elischer
On 11/17/11 11:40 AM, Maxim Ignatenko wrote: Julian Elischer wrote: On 11/16/11 12:55 AM, Ed Schouten wrote: * Maxim Ignatenko, 2015 21:18: I'm currently inventing the wheel^W^W^Wwriting a firewall from scratch and looking for most convenient way to establish communication between userspa

Re: Communication between kernel and userspace via local socket

2011-11-19 Thread Maxim Ignatenko
On сб, 19 лис 2011 11:02:47 Julian Elischer wrote: > On 11/17/11 11:40 AM, Maxim Ignatenko wrote: > > Julian Elischer wrote: > >> On 11/16/11 12:55 AM, Ed Schouten wrote: > >>> * Maxim Ignatenko, 2015 21:18: > I'm currently inventing the wheel^W^W^Wwriting a firewall from scratch > an

gcc 4.2 miscompilation with -O2 -fno-omit-frame-pointer on amd64

2011-11-19 Thread Gleb Kurtsou
Hi, I was lucky to write a bit of code which gcc 4.2 fails to compile correctly with -O2. Too keep long story short the code fails for gcc from base system and last gcc 4.2 snapshot from ports. It works with gcc 4.3, gcc 4.4 on FreeBSD and Linux. Clang from base is also good. -O and -Os optimizati

Re: gcc 4.2 miscompilation with -O2 -fno-omit-frame-pointer on amd64

2011-11-19 Thread Alexander Best
On Sat Nov 19 11, Gleb Kurtsou wrote: > Hi, > > I was lucky to write a bit of code which gcc 4.2 fails to compile > correctly with -O2. Too keep long story short the code fails for gcc > from base system and last gcc 4.2 snapshot from ports. It works with gcc > 4.3, gcc 4.4 on FreeBSD and Linux. C

Re: gcc 4.2 miscompilation with -O2 -fno-omit-frame-pointer on amd64

2011-11-19 Thread Gleb Kurtsou
On (19/11/2011 12:25), Alexander Best wrote: > On Sat Nov 19 11, Gleb Kurtsou wrote: > > Hi, > > > > I was lucky to write a bit of code which gcc 4.2 fails to compile > > correctly with -O2. Too keep long story short the code fails for gcc > > from base system and last gcc 4.2 snapshot from ports.

Re: gcc 4.2 miscompilation with -O2 -fno-omit-frame-pointer on amd64

2011-11-19 Thread mdf
On Sat, Nov 19, 2011 at 2:01 AM, Gleb Kurtsou wrote: > Hi, > > I was lucky to write a bit of code which gcc 4.2 fails to compile > correctly with -O2. Too keep long story short the code fails for gcc > from base system and last gcc 4.2 snapshot from ports. It works with gcc > 4.3, gcc 4.4 on FreeB

Re: gcc 4.2 miscompilation with -O2 -fno-omit-frame-pointer on amd64

2011-11-19 Thread Gleb Kurtsou
On (19/11/2011 07:26), m...@freebsd.org wrote: > On Sat, Nov 19, 2011 at 2:01 AM, Gleb Kurtsou wrote: > > Hi, > > > > I was lucky to write a bit of code which gcc 4.2 fails to compile > > correctly with -O2. Too keep long story short the code fails for gcc > > from base system and last gcc 4.2 sna

Re: gcc 4.2 miscompilation with -O2 -fno-omit-frame-pointer on amd64

2011-11-19 Thread mdf
On Sat, Nov 19, 2011 at 8:19 AM, Gleb Kurtsou wrote: > On (19/11/2011 07:26), m...@freebsd.org wrote: >> On Sat, Nov 19, 2011 at 2:01 AM, Gleb Kurtsou wrote: >> > Hi, >> > >> > I was lucky to write a bit of code which gcc 4.2 fails to compile >> > correctly with -O2. Too keep long story short the

Re: gcc 4.2 miscompilation with -O2 -fno-omit-frame-pointer on amd64

2011-11-19 Thread Alexander Best
On Sat Nov 19 11, Gleb Kurtsou wrote: > On (19/11/2011 12:25), Alexander Best wrote: > > On Sat Nov 19 11, Gleb Kurtsou wrote: > > > Hi, > > > > > > I was lucky to write a bit of code which gcc 4.2 fails to compile > > > correctly with -O2. Too keep long story short the code fails for gcc > > > fr

Re: easy way to determine if a stream or fd is seekable

2011-11-19 Thread Tim Kientzle
On Nov 18, 2011, at 2:10 PM, Juergen Lock wrote: > On Fri, Nov 18, 2011 at 12:00:07PM -0800, Tim Kientzle wrote: >> >> On Nov 17, 2011, at 12:55 PM, Juergen Lock wrote: >> After a few experiments, bsdtar stopped using lseek() on FreeBSD for anything other than regular files and

Re: easy way to determine if a stream or fd is seekable

2011-11-19 Thread Tim Kientzle
On Nov 18, 2011, at 12:31 PM, Alexander Best wrote: > On Fri Nov 18 11, Tim Kientzle wrote: >> >> Take a look at >> >> http://libarchive.googlecode.com/svn/trunk/libarchive/archive_read_open_filename.c >> >> Especially the comments about detecting "disk-like" devices. >> I rewrote a bunch of