public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* segv at strcmp
@ 2003-12-24 23:13 umut aymakoglu
  2003-12-24 23:44 ` Jeff Woods
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: umut aymakoglu @ 2003-12-24 23:13 UTC (permalink / raw)
  To: linux-ia64

Hi -

We have hit a problem with strcmp() on UnitedLinux 1.0
with kernel: 2.4.19 and glibc: 2.2.5.
I am wondering if anybody has seen something like it
or knows if already there is a patch. I do not have a
small repro but i will try to explain:

The segv happens at memcmp() at a line like:
'strcmp(x, "this is 24 chars long")' where x is a char
pointer with a length of 7 and the constant has a
length of 24. x is located at the first 8 bytes of the
last 16 bytes at the end of a non-contiguous shared
memory segment. memcmp() segvs when it tries to load 8
bytes from the "r19" register which initially has the
address of x and points to the end of the segment when
the segv happens.

any help would be appreciated,
thanks,
Umut 


__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

^ permalink raw reply	[flat|nested] 14+ messages in thread
* RE: segv at strcmp
@ 2004-01-05 19:08 umut aymakoglu
  2004-01-05 19:19 ` Luck, Tony
                   ` (8 more replies)
  0 siblings, 9 replies; 14+ messages in thread
From: umut aymakoglu @ 2004-01-05 19:08 UTC (permalink / raw)
  To: linux-ia64

Hi -
  The gcc version is gcc-3.2-29 and the flags we pass
to gcc are : -O -ansi -fwritable-strings -fsigned-char
-D_GNU_SOURCE -D_REENTRANT

thanks,
Umut
--- "Luck, Tony" <tony.luck@intel.com> wrote:
> > We have hit a problem with strcmp() on UnitedLinux
> 1.0
> > with kernel: 2.4.19 and glibc: 2.2.5.
> > I am wondering if anybody has seen something like
> it
> > or knows if already there is a patch. I do not
> have a
> > small repro but i will try to explain:
> > 
> > The segv happens at memcmp() at a line like:
> > 'strcmp(x, "this is 24 chars long")' where x is a
> char
> > pointer with a length of 7 and the constant has a
> > length of 24. x is located at the first 8 bytes of
> the
> > last 16 bytes at the end of a non-contiguous
> shared
> > memory segment. memcmp() segvs when it tries to
> load 8
> > bytes from the "r19" register which initially has
> the
> > address of x and points to the end of the segment
> when
> > the segv happens.
> 
> Sounds like your compiler converted the strcmp(str,
> const_str)
> into memcmp(str, const_str, strlen(const_str)) ...
> and then
> the memcmp fell off the end of the page.
> 
> What version of gcc are you using, and what
> arguments are you
> passing to gcc?
> 
> -Tony


__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2004-01-06 19:58 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-24 23:13 segv at strcmp umut aymakoglu
2003-12-24 23:44 ` Jeff Woods
2003-12-25  0:25 ` Luck, Tony
2003-12-25  1:11 ` Zhu, Yi
  -- strict thread matches above, loose matches on Subject: below --
2004-01-05 19:08 umut aymakoglu
2004-01-05 19:19 ` Luck, Tony
2004-01-05 19:52 ` umut aymakoglu
2004-01-05 20:10 ` Luck, Tony
2004-01-05 22:06 ` David Mosberger
2004-01-06  0:04 ` umut aymakoglu
2004-01-06  1:14 ` Luck, Tony
2004-01-06  1:38 ` umut aymakoglu
2004-01-06  2:01 ` Chen, Kenneth W
2004-01-06 19:58 ` umut aymakoglu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox