[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Perl editor thunk blows stack

From: Geoff Richards <qef_at_ungwe.org>
Date: 2006-11-17 19:09:55 CET

This is reproducible, but not easily, hence no tests. I'm not sure how
I'd go about writing them anyway, and I haven't got the time right now.

I found the bug when my editor, which was getting a large update (many
modified files) failed to correctly access a database (the DBI's
selectrow_array method returned a corrupted value). It seems that the
Perl argument stack was getting bigger every time a method in my Perl
editor class was getting called. Somehow that resulted in the value
getting messed up.

The patch makes my code work, and the tests still work too. The stack
still seems to be getting bigger where it shouldn't, but not as much.
Either I'm misinterpretting that or there's another bug somewhere else,
but this fix definitely makes things better.

[[[
Fix leak of space on the Perl argument stack when calling methods in
a Perl class acting as a commit editor.

* subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c
  (svn_swig_pl_callback_thunk): Add additional 'PUTBACK' after the
  return value from the Perl function has been popped off the stack.
]]]

-- 
--- Geoff Richards -------------><-------------- http://ungwe.org/ ---
"I tried to fling my shadow at the moon,
 The while my blood leapt with a wordless song."  --  Theodore Roethke


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Fri Nov 17 19:10:18 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.