Apache Mod-Python - Commented: (MODPYTHON-99) accessing some request or server object members causes a seg

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > December 2005 > Commented: (MODPYTHON-99) accessing some request or server object members causes a seg





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Commented: (MODPYTHON-99) accessing some request or server object members causes a seg
Jim Gallacher (JIRA)

2005-12-09, 8:46 pm

[ http://issues.apache.org/jira/brows...action_12359979 ]

Jim Gallacher commented on MODPYTHON-99:
----------------------------------------

Some of the unit tests fail after applying Martin's patch. Investigating further reveals that request members are being tested in the unit tests but there are several problems.

One failing test is for req.allowed_xmethods != (). I think this may be a problem with test itself as it seems allowed_xmethods returns None.

The question remains though: why were the tests not detecting the segfaults detailed in this issue?

> accessing some request or server object members causes a segfault
> -----------------------------------------------------------------
>
> Key: MODPYTHON-99
> URL: http://issues.apache.org/jira/browse/MODPYTHON-99
> Project: mod_python
> Type: Bug
> Components: core
> Versions: 3.2
> Reporter: Jim Gallacher
> Priority: Critical
> Attachments: md-20051209.diff
>
> Martin Devara discovered a segfault when accessing some request object members. For example:
> def handler(req):
> req.content_type = "text/plain"
> req.write("EE\n")
> a = getattr(req,"allowed_methods");
> return apache.OK
> Futher investigation revealed problems with several getter functions in requestobject.c and serverobject.c. The root of the problem seems to be pointer dereferencing errors in the getter code. The affected functions and the members which use them are:
> src/requestobject.c
> getreq_rec_ml
> allowed_methods
> getreq_rec_ah
> content_languages
> allowed_xmethods
> src/serverobject.c
> getsrv_recmbr_ah
> names
> wild_names
> Martin has provided a patch to fix the bug.
> (Thanks to Martin for tracking this down and providing the fix.)


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com