Python 2.2: segmentation fault in test_strftime 
Author Message
 Python 2.2: segmentation fault in test_strftime

Hi there,

after compiling python 2.2 on Linux 2.2.19, 'make test' gave me a
segmentation fault in test_strftime. I tracked it down to a problem in
the calendar module:

Python 2.2 (#2, Jan  3 2002, 14:18:23)
[GCC 2.7.2.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.

Quote:
>>> import calendar
>>> calendar.day_abbr[0]
'Mon'
>>> calendar.day_abbr[1]
'Tue'
>>> calendar.day_abbr[2]

Segmentation fault (core dumped)

Any ideas what this could be?

Regards
Carsten.
--



Mon, 21 Jun 2004 22:09:59 GMT  
 Python 2.2: segmentation fault in test_strftime

Quote:

> Hi there,

> after compiling Python 2.2 on Linux 2.2.19, 'make test' gave me a
> segmentation fault in test_strftime. I tracked it down to a problem in
> the calendar module:

> Python 2.2 (#2, Jan  3 2002, 14:18:23)
> [GCC 2.7.2.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import calendar
> >>> calendar.day_abbr[0]
> 'Mon'
> >>> calendar.day_abbr[1]
> 'Tue'
> >>> calendar.day_abbr[2]
> Segmentation fault (core dumped)

> Any ideas what this could be?

Nope.  Doesn't crash for me.

What does a backtrace show?  What version of glibc do you have?

Cheers,
M.

--
  MARVIN:  Oh dear, I think you'll find reality's on the blink again.
                   -- The Hitch-Hikers Guide to the Galaxy, Episode 12



Tue, 22 Jun 2004 01:05:14 GMT  
 Python 2.2: segmentation fault in test_strftime

Quote:

>after compiling Python 2.2 on Linux 2.2.19, 'make test' gave me a
>segmentation fault in test_strftime. I tracked it down to a problem in
>the calendar module:
 ...
>>>> calendar.day_abbr[2]
>Segmentation fault (core dumped)

>Any ideas what this could be?

I saw a similar problem with strftime a month or so back.  I
was able to reproduce it in straight C code.  The code was
written as documented and ran on other OSes, so I figured it
was a bug in glibc.  It worked on another glibc so I
concluded my library was probably out of date, but didn't
investigate further.

Don't have the machine handy to test your reproducible.

                    Andrew



Tue, 22 Jun 2004 04:38:03 GMT  
 Python 2.2: segmentation fault in test_strftime

Quote:


> > Python 2.2 (#2, Jan  3 2002, 14:18:23)
> > [GCC 2.7.2.3] on linux2
> > Type "help", "copyright", "credits" or "license" for more information.
> > >>> import calendar
> > >>> calendar.day_abbr[0]
> > 'Mon'
> > >>> calendar.day_abbr[1]
> > 'Tue'
> > >>> calendar.day_abbr[2]
> > Segmentation fault (core dumped)

> > Any ideas what this could be?

> Nope.  Doesn't crash for me.

> What does a backtrace show?  What version of glibc do you have?

Uhm, excuse my ignorance, but what is a backtrace?
glibc is 2.0.7. Seems to be broken - if you can call it 'broken':
strftime() with all fields of the tm struct set to 2 (this is what
calendar.day_abbr does) segfaults. I tested it with a small C program.
I think I can live with that, since this is an extremely pathological
case.

cg.
--
Python is taken from python site. What to do? What is that?
                            -- scenes from comp.lang.python



Tue, 22 Jun 2004 18:42:22 GMT  
 Python 2.2: segmentation fault in test_strftime

Quote:



> > > Python 2.2 (#2, Jan  3 2002, 14:18:23)
> > > [GCC 2.7.2.3] on linux2
> > > Type "help", "copyright", "credits" or "license" for more information.
> > > >>> import calendar
> > > >>> calendar.day_abbr[0]
> > > 'Mon'
> > > >>> calendar.day_abbr[1]
> > > 'Tue'
> > > >>> calendar.day_abbr[2]
> > > Segmentation fault (core dumped)

> > > Any ideas what this could be?

> > Nope.  Doesn't crash for me.

> > What does a backtrace show?  What version of glibc do you have?

> Uhm, excuse my ignorance, but what is a backtrace?

Well, when you get the above "Segmentation fault (core dumped)"
message, there should be a file "core" somewhere, probably in the
directory you build python in.

In this directory run "gdb ./python core" and type "bt" at the prompt.
What you get is a backtrace.

In this case it seems to be irrelevant:

Quote:
> glibc is 2.0.7. Seems to be broken - if you can call it 'broken':
> strftime() with all fields of the tm struct set to 2 (this is what
> calendar.day_abbr does) segfaults.

Oops.

Quote:
> I tested it with a small C program.  I think I can live with that,
> since this is an extremely pathological case.

Certainly, it seems unlikely to be a Python problem...

Cheers,
M.

--
  The Programmer's Quick Guide To Python (Time Machine version):
    You try to shoot yourself in the foot, only to realize that
    there's no need, since Guido thoughtfully shot you in the foot
    years ago.                     -- Nick Mathewson, comp.lang.python



Tue, 22 Jun 2004 19:56:10 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Python extending with C --- segmentation fault

2. segmentation faults with perl and python

3. RedHat 8.0 Apache + Python CGI segmentation faults

4. segmentation fault when unpickling an object in another Python instance

5. 1 .__nonzero__() => memory fault (2.2 win32)

6. Python ActiveX Scripting Engine (0x80020009) Error - KeyboardInterrupt - python 2.2

7. Python 2.2 + Win32All 146 = Python/ASP Failures

8. Python 2.0 / Python 2.2

9. Python 2.1 == Jython 2.1 != Python 2.2?

10. VIM - python errors after upgrading to Python 2.2 (Windows OLE)

11. visual works 3.1 image has segmentation fault on 2.4 kernel (red hat 8.0)

12. segmentation fault on gabage collect

 

 
Powered by phpBB® Forum Software