This is the mail archive of the glibc-linux@ricardo.ecn.wfu.edu mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Large File Support in glibc 2.1?


>>>>> Ali Bahrami writes:

Ali>    Having heard that GlibC 2.1 has support for files with 64-bit offsets
Ali> and having recently installed Red Hat 6 Linux which is based on that
Ali> library, I decided to enable large file support for my application
Ali> (an application which already handles 64-bit offsets under Solaris,
Ali> Dec Unix, IRIX, and HP-UX).

Ali> I compiled everything with "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
Ali> and was able to link without error. At runtime, I get a segfault,
Ali> which turns out to be in 

Ali>     #0  0x408eb1f1 in _IO_old_file_close_it (fp=0x8190a20) at oldfileops.c:143
Ali>     #1  0x408e7595 in _IO_old_fclose (fp=0x8190a20) at oldiofclose.c:43

_IO_old_* are used if the file was opened from a program linked
against glibc 2.0.  You should recompile your libraries against glibc 2.1.

If you could come up with a small program that shows this crash that
would be fine.

Ali> At this point, it looks like a file opened with the 64-bit open is being
Ali> closed with a 32-bit close, or so I infer from the "old" in the function
Ali> names. In solving this problem, I can see the following possibilities:

Ali> 	1) I have built/linked my program incorrectly for glibc.
Ali> 	2) The glibc 2.1 shipping with RedHat 6 has problems in this
Ali> 	   area.

Ali> This leads to my real problem --- I have been unable to dig up any 
Ali> information about glibc 2.1's large file support at all. Newsgroups,
Ali> and extensive web searching have yielded next to no information on this
Ali> topic. I freely admit that this is probably a simple RTFM problem, if
Ali> I could just find the right stuff to read...

Ali> If anyone in this group can point me at documentation of any type
Ali> describing how complete glibc 2.1's support for large files is
Ali> and/or how one should proceed in using it, I would greatly appreciate
Ali> it. Thanks...

It should be complete and is documented in the manual
(/usr/info/libc.info*).

But it's not really tested so far, I wouldn't be surprised to get bug
reports (please always use the glibcbug script!).

Andreas
-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]