Bugs item #1649059, was opened at 2007-01-31 18:35
Message generated for change (Comment added) made by tsheyar
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1649059&group_id=56967

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: PF/compiler
Group: Pathfinder CVS Head
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Jan Rittinger (tsheyar)
Assigned to: Nobody/Anonymous (nobody)
Summary: XQ: global variables in embedded pf not resetted

Initial Comment:
I now file a bug report based on Jan Flokstra report on problems with memory 
allocation (see: 
http://sourceforge.net/mailarchive/forum.php?thread_id=31561760&forum_id=39803)

His problem (and also mine) is that mem_realloc is called with a NULL pointer. 
(The wrong handling of this NULL pointer should be another bug report.)

This realloc is called by PFarray_at() and PFarray_at() itself is called with a 
PFarray that contains only garbage. The reason for this PFarray to contain only 
garbage is that it is initialized only if the variable that stores the 
reference is set to NULL. This is however not the case when pf is called a 
second time without stopping (e.g. using MapiClient) as the variable itself is 
initialized globally to NULL.

While a fix seems rather easy I opened a bug report instead as this might be 
not the only place where global variables are initialized globally.

Perhaps Peters suggestion to run pf in a separate thread might be a good 
alternative to avoid such problems and to keep Mserver alive even if pf crashes.

----------------------------------------------------------------------

>Comment By: Jan Rittinger (tsheyar)
Date: 2007-02-01 11:32

Message:
Logged In: YES 
user_id=993208
Originator: YES

Here is a list of affected files -- as far as I can see:
(The ones marked with a star might affect also the stable branch.)

compile.c* (urlcache)
main.c (opt_buf)
oops.c* (PFerrbuf)
qname.c (qnames, qname_hash)
algebra/core2alg.brg (map, map_count, ...)
core/core.c* (core_vars)
core/fs.brg* (any)
debug/abssynprint.c
debug/coreprint.c
debug/milprint.c
include/pathfinder.h* (PFquery)
parser/parser.y* (root, modules, ...)



----------------------------------------------------------------------

Comment By: Jan Rittinger (tsheyar)
Date: 2007-01-31 21:47

Message:
Logged In: YES 
user_id=993208
Originator: YES

Stefan, the bug is triggered by Jens' qname changes to the CVS head. But
as I said before it might be possible that a similar style of programming
might be used throughout pf and thus might trigger bugs (with a less
obvious effect).

----------------------------------------------------------------------

Comment By: Stefan Manegold (stmane)
Date: 2007-01-31 20:12

Message:
Logged In: YES 
user_id=572415
Originator: NO

Any idea, whether this also applies to the latest release branch and hence
should be analyze/fixed there?


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1649059&group_id=56967

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to