RESOLVED FIXED 7681
memory leak in the plug-in tests
https://bugs.webkit.org/show_bug.cgi?id=7681
Summary memory leak in the plug-in tests
Darin Adler
Reported 2006-03-09 07:28:09 PST
I noticed that the new plug-in tests are exhibiting leaks. The bug is in the test plug-in. I have a fix.
Attachments
patch with detailed change log (13.95 KB, patch)
2006-03-09 07:40 PST, Darin Adler
sullivan: review+
Darin Adler
Comment 1 2006-03-09 07:40:49 PST
Created attachment 6958 [details] patch with detailed change log
Alexey Proskuryakov
Comment 2 2006-03-09 08:33:52 PST
> Changed code to put the strings in malloc buffers instead of relying on GCC's extension > that allows variable-sized arrays on the stack. Didn't this use a standard C99 feature (although gcc variable-sized arrays aren't exactly the same as C99 ones)?
John Sullivan
Comment 3 2006-03-09 09:11:06 PST
Comment on attachment 6958 [details] patch with detailed change log Nice clean-up, r=me.
Darin Adler
Comment 4 2006-03-10 11:24:34 PST
(In reply to comment #2) > Didn't this use a standard C99 feature (although gcc variable-sized arrays > aren't exactly the same as C99 ones)? There are good reasons to not use this in general, even though it's present in C99. For one thing, we don't have a C99-compliant compiler on all the paltforms we target. For another, using a variable amount of stack can cause problems on OS X. Because of that, we generally don't use this technique in any production code. A test tool doesn't quite qualify as production code, of course.
Note You need to log in before you can comment on or make changes to this bug.