Re: fstream on linuxx8664gcc platform

From: Masaharu Goto <gotom_at_hanno.jp>
Date: Sat, 14 May 2005 23:11:02 +0900


Hello, Kerry,

I need more information about basic_streambuf::tellg() and pos_type. Will you try following commands on both environment and tell me what you see?

Thank you
Masa Goto

$ root
root> type ostream::pos_type

     ...
root> type mbstate_t

     ...
root> class mbstate_t

     ...
root> class fpos<mbstate_t>

     ...

On 2005/05/14, at 9:29, Fons Rademakers wrote:

> Hi Kerry,
>
> I see the same problem on my AMD64. Looks like a CINT issue. I'll
> forward it to Masa.
>
> Cheers, Fons.
>
>
>
> LEE, KERRY T. (JSC-SF) (UHCL) wrote:
>> Dear Root Team,
>> I have transferred some code from a linuxicc platform ROOT version
>> 4.02/00
>> to linuxx8664gcc ROOT version 4.04/02 and it crashed due to incorrect
>> determination of the filesize using fstream. Here is a sample code
>> that
>> reproduces the problem, where you just put a file in ascii format in
>> place
>> of "mntExHdd". The correct filesize in my case is 105bytes.
>> //TestStream.C
>> {
>> TString FileName="mntExHdd";
>> fstream fff(FileName,ios_base::in);
>> if(fff.good()){
>> fff.seekg(0,ios_base::end);
>> int FileSize = fff.tellg();
>> cout<<"FileSize="<<FileSize<<endl;
>> fff.seekg(0,ios_base::beg);
>> } fff.close();
>> }
>> The results from linuxicc
>> *******************************************
>> * *
>> * W E L C O M E to R O O T *
>> * *
>> * Version 4.02/00 17 December 2004 *
>> * *
>> * You are welcome to visit our Web site *
>> * http://root.cern.ch *
>> * *
>> *******************************************
>> FreeType Engine v2.1.3 used to render TrueType fonts.
>> Compiled for linuxicc with thread support.
>> CINT/ROOT C/C++ Interpreter version 5.15.159, Nov 14 2004
>> Type ? for help. Commands must be C++ statements.
>> Enclose multiple statements between { }.
>> root [0] .x TestStream.C
>> FileSize=105
>> The Results from linuxx8664gcc
>> *******************************************
>> * *
>> * W E L C O M E to R O O T *
>> * *
>> * Version 4.04/02 9 May 2005 *
>> * *
>> * You are welcome to visit our Web site *
>> * http://root.cern.ch *
>> * *
>> *******************************************
>> Compiled for linuxx8664gcc with thread support.
>> CINT/ROOT C/C++ Interpreter version 5.15.169, Mar 14 2005
>> Type ? for help. Commands must be C++ statements.
>> Enclose multiple statements between { }.
>> root [0] .x TestStream.C
>> FileSize=7470896
>> Thanks
>> Kerry
>
> --
> Org: CERN, European Laboratory for Particle Physics.
> Mail: 1211 Geneve 23, Switzerland
> E-Mail: Fons.Rademakers_at_cern.ch Phone: +41 22 7679248
> WWW: http://www.rademakers.org/fons/ Fax: +41 22 7679480
>
Received on Sat May 14 2005 - 16:07:41 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:08 MET