This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

Re: broken strlen (Re: strange bootstrapping problems on i386-sequent-sysv4)



  In message <200003241855.SAA00800@Maidavale.thyron-local>you write:
  > As turned out, the root of the problem is strlen in the vendor's C library!
  >  It
  > can read beyond the terminating 0, causing a SIGSEGV from time to time
  > (apparently if the next memory page is not assigned to the process, see the
  > debug session below).
Stunos 4.1.x is known to have a similar problem.  I don't remember which
str* function exhibits the behavior, but the failure mode is basically the
same as you have described.

We have not written code to work around this problem yet by using the
libiberty versions of those routines when the vendor ones are broken.

  > BTW, why is __builtin_strlen (&co) not built in under the name strlen (etc,
  > resp) if -fhosted is given (or defaulted)?
?!?  In a hosted environment gcc will recognize strlen as a built-in, but
that does not mean it will always prefer to expand it inline. 
  > -----------------------------------------------------------------
  > This email is confidential and intended solely for the use of the
  > individual to whom it is addressed.
  > Any views or opinions presented are solely those of the author
  > and do not necessarily represent those of Thyron Limited.
  > If you are not the intended recipient then please be advised
  > that you have received this email in error and that any use,
  > dissemination, forwarding, printing or copying of this email 
  > is strictly prohibited.
  > If you have received this email in error, please notify the 
  > Thyron IT Administrator on +44 (0)1923 236 050 or 
  > send an email to mail-admin@thyron.com.
  > Thank You
This is considered poor etiquette for this list.  What's the point of
attaching this kind of signature to a message going to a highly public
list?

jeff


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