This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC] Libstdc++/13858 vs enc_filebuf/.../13189.cc


Hi everyone, hi Benjamin,

it looks like my fix for libstdc++/13858 exposed latent problems
in enc_filebuf which we didn't notice 'til now.

The concerned testcases do:

 try
   {
     state_type st;
     filebuf_type fbuf(st);
     locale loc(locale::classic(), new enc_codecvt);
     fbuf.pubimbue(loc);
     fbuf.open("tmp_13189c", mode);
     fbuf.sputc('a');
     fbuf.pubseekoff(0, ios_base::beg);
     fbuf.sgetc();
     fbuf.close();
   }
 catch(...)
   {
     VERIFY( false );
   }

and now that overflow throws in case of conversion errors the
catch block is reached.

Of course, overflow was already failing before my patch, just we
couldn't possibly notice that.

I'm not sure what we want to do, since enc_filebuf is not really
supposed to be functional and 13189, actually, was only about
*compilation* errors...

Shall I just remove for now the VERIFY in the catch block?

Paolo.


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