r36000 - in /packages/wordnet/trunk/debian: changelog patches/52_wordnet3.0_lib_search_c_memory_patch patches/90_prevent_parallel_build.patch
tille at users.alioth.debian.org
tille at users.alioth.debian.org
Thu Nov 19 13:57:55 UTC 2009
Author: tille
Date: Thu Nov 19 13:57:54 2009
New Revision: 36000
URL: http://svn.debian.org/wsvn/debian-science/?sc=1&rev=36000
Log:
Applied patch to fix memory leak and hopefully fix FTBFS problem
Added:
packages/wordnet/trunk/debian/patches/52_wordnet3.0_lib_search_c_memory_patch
Modified:
packages/wordnet/trunk/debian/changelog
packages/wordnet/trunk/debian/patches/90_prevent_parallel_build.patch
Modified: packages/wordnet/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/debian-science/packages/wordnet/trunk/debian/changelog?rev=36000&op=diff
==============================================================================
--- packages/wordnet/trunk/debian/changelog (original)
+++ packages/wordnet/trunk/debian/changelog Thu Nov 19 13:57:54 2009
@@ -1,8 +1,17 @@
wordnet (1:3.0-20) unstable; urgency=low
+ [ Dmitry E. Oboukhov ]
* Fixed debian/watch, closes: #556121.
- -- Dmitry E. Oboukhov <unera at debian.org> Wed, 18 Nov 2009 17:02:30 +0300
+ [ Andreas Tille ]
+ * Applied patch from Vikas N Kumar <walburn at gmail.com> to dix
+ a Memory crash in findtheinfo_ds() (Thanks to Vikas)
+ Closes: #555928
+ * Prevent parallel builds by using the .NOTPARALLEL option in
+ global Makefile.in
+ hopefully closes: #549768
+
+ -- Andreas Tille <tille at debian.org> Thu, 19 Nov 2009 13:51:50 +0100
wordnet (1:3.0-19) unstable; urgency=low
Added: packages/wordnet/trunk/debian/patches/52_wordnet3.0_lib_search_c_memory_patch
URL: http://svn.debian.org/wsvn/debian-science/packages/wordnet/trunk/debian/patches/52_wordnet3.0_lib_search_c_memory_patch?rev=36000&op=file
==============================================================================
--- packages/wordnet/trunk/debian/patches/52_wordnet3.0_lib_search_c_memory_patch (added)
+++ packages/wordnet/trunk/debian/patches/52_wordnet3.0_lib_search_c_memory_patch Thu Nov 19 13:57:54 2009
@@ -1,0 +1,128 @@
+Author: Vikas N Kumar <walburn at gmail.com>
+Fixes: #555928
+Description: Memory crash in findtheinfo_ds() if using COORDS pointer searchtype
+ There is a memory error in Wordnet 3.0 library when you perform the following 2
+ function calls with the arguments as shown:
+ .
+ SynsetPtr syn = findtheinfo_ds("agriculture", NOUN, COORDS, ALLSENSES);
+ free_syns(syn);
+ .
+ this will cause a crash (segmentation fault or coredump) at the end.
+
+--- WordNet-3.0.orig/lib/search.c
++++ WordNet-3.0/lib/search.c
+@@ -229,11 +229,11 @@
+ /* Get offset of first entry. Then eliminate duplicates
+ and get offsets of unique strings. */
+
+- if (strings[0][0] != NULL)
++ if (strings[0][0] != '\0')
+ offsets[0] = index_lookup(strings[0], dbase);
+
+ for (i = 1; i < MAX_FORMS; i++)
+- if ((strings[i][0]) != NULL && (strcmp(strings[0], strings[i])))
++ if ((strings[i][0]) != '\0' && (strcmp(strings[0], strings[i])))
+ offsets[i] = index_lookup(strings[i], dbase);
+ }
+
+@@ -492,9 +492,11 @@
+ while(cursyn) {
+ if (cursyn->nextform)
+ free_syns(cursyn->nextform);
++ cursyn->nextform = NULL;
+ nextsyn = cursyn->nextss;
+ free_synset(cursyn);
+ cursyn = nextsyn;
++ nextsyn = NULL;
+ }
+ }
+ }
+@@ -504,32 +506,64 @@
+ void free_synset(SynsetPtr synptr)
+ {
+ int i;
+-
+- free(synptr->pos);
++
++ if (synptr->pos)
++ free(synptr->pos);
++ synptr->pos = NULL;
+ for (i = 0; i < synptr->wcount; i++){
+- free(synptr->words[i]);
++ if (!synptr->words)
++ break;
++ if (synptr->words[i]) {
++ free(synptr->words[i]);
++ synptr->words[i] = NULL;
++ }
+ }
+- free(synptr->words);
+- free(synptr->wnsns);
+- free(synptr->lexid);
++ if (synptr->words)
++ free(synptr->words);
++ synptr->words = NULL;
++ if (synptr->wnsns)
++ free(synptr->wnsns);
++ synptr->wnsns = NULL;
++ if (synptr->lexid)
++ free(synptr->lexid);
++ synptr->lexid = NULL;
+ if (synptr->ptrcount) {
+- free(synptr->ptrtyp);
+- free(synptr->ptroff);
+- free(synptr->ppos);
+- free(synptr->pto);
+- free(synptr->pfrm);
++ if (synptr->ptrtyp)
++ free(synptr->ptrtyp);
++ synptr->ptrtyp = NULL;
++ if (synptr->ptroff)
++ free(synptr->ptroff);
++ synptr->ptroff = NULL;
++ if (synptr->ppos)
++ free(synptr->ppos);
++ synptr->ppos = NULL;
++ if (synptr->pto)
++ free(synptr->pto);
++ synptr->pto = NULL;
++ if (synptr->pfrm)
++ free(synptr->pfrm);
++ synptr->pfrm = NULL;
+ }
+ if (synptr->fcount) {
+- free(synptr->frmid);
+- free(synptr->frmto);
++ if (synptr->frmid)
++ free(synptr->frmid);
++ synptr->frmid = NULL;
++ if (synptr->frmto)
++ free(synptr->frmto);
++ synptr->frmto = NULL;
+ }
+ if (synptr->defn)
+ free(synptr->defn);
++ synptr->defn = NULL;
+ if (synptr->headword)
+ free(synptr->headword);
++ synptr->headword = NULL;
+ if (synptr->ptrlist)
+ free_syns(synptr->ptrlist); /* changed from free_synset() */
+- free(synptr);
++ synptr->ptrlist = NULL;
++ synptr->nextss = NULL;
++ free(synptr);
++ synptr = NULL;
+ }
+
+ /* Free an index structure */
+@@ -1658,7 +1692,8 @@
+ if (ptrtyp == COORDS) { /* clean up by removing hypernym */
+ lastsyn = synlist->ptrlist;
+ synlist->ptrlist = lastsyn->ptrlist;
+- free_synset(lastsyn);
++ lastsyn->ptrlist = NULL;
++ free_syns(lastsyn);
+ }
+ }
+ wnresults.searchds = synlist;
Modified: packages/wordnet/trunk/debian/patches/90_prevent_parallel_build.patch
URL: http://svn.debian.org/wsvn/debian-science/packages/wordnet/trunk/debian/patches/90_prevent_parallel_build.patch?rev=36000&op=diff
==============================================================================
--- packages/wordnet/trunk/debian/patches/90_prevent_parallel_build.patch (original)
+++ packages/wordnet/trunk/debian/patches/90_prevent_parallel_build.patch Thu Nov 19 13:57:54 2009
@@ -14,3 +14,15 @@
+# see http://bugs.debian.org/540491
+.NOTPARALLEL:
+
+--- wordnet-3.0.orig/Makefile.in
++++ wordnet-3.0/Makefile.in
+@@ -657,3 +657,9 @@
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
++
++# Prevent parallel builds as it was advised by Jakub Wilk <ubanus at users.sf.net>
++# see http://bugs.debian.org/540491
++# I hope this also fixes #549768
++.NOTPARALLEL:
++
More information about the debian-science-commits
mailing list