[LTP] [PATCH] syscalls/fcntl34: use struct flock64 on 32bit

Jiri Jaburek jjaburek@redhat.com
Mon Jun 13 19:58:25 CEST 2016


On 06/13/16 16:22, Cyril Hrubis wrote:
> Since both manual and glibc examples use struct flock with OFD locks in
> examples and if I compile glibc example for OFD locks[1] on 32bit system
> garbage is passed to kernel syscalls and the program hangs, so I would
> call this glibc/kernel bug.
> 
> I would expect glibc to convert the flock structure to 64 bit one
> silently in this case.

That might not be possible as such "silent" conversion could break
a lot of existing programs that rely on hardcoded 32bit struct flock
size.

However I double-tested it with systemtap and filed the bug anyway,
https://sourceware.org/bugzilla/show_bug.cgi?id=20251

Thanks for pointing out the glibc example.

> 
> [1] manual/examples/ofdlocks.c
>     https://sourceware.org/git/?p=glibc.git;a=blob;f=manual/examples/ofdlocks.c;h=ba4f0ef4d237e95b8f1e0f37b9c1befd4afda0d4;hb=HEAD
> 



More information about the ltp mailing list