Bug #1651

Updated by Matthieu Decorde about 4 years ago

<pre>
Java_org_txm_searchengine_cqp_MemCqiServer_start: start
INIT CQILIB:
PARAM: /usr/lib/TXM/cwb/bin/cqpserver
PARAM: -I
PARAM: /usr/lib/TXM/cwb/cqpserver.init
PARAM: -r
PARAM: ... very long parameter ...
PARAM: -b
PARAM: 1000000
PARAM: -d
PARAM: OFF
PARAM: -P
PARAM: 4877
Parse options for app mode 3
*** buffer overflow detected ***: /usr/lib/jvm/java-7-openjdk-amd64/bin/java terminated
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7338f)[0x7f58e974b38f]
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7f58e97e2c9c]
/lib/x86_64-linux-gnu/libc.so.6(+0x109b60)[0x7f58e97e1b60]
/usr/lib/TXM/cwb/bin/libcqpjni.so(+0x298c5)[0x7f58b64888c5]
/usr/lib/TXM/cwb/bin/libcqpjni.so(check_available_corpora+0x38)[0x7f58b6488a48]
/usr/lib/TXM/cwb/bin/libcqpjni.so(initialize_cqp+0x16b)[0x7f58b647c3eb]
/usr/lib/TXM/cwb/bin/libcqpjni.so(Java_org_txm_searchengine_cqp_MemCqiServer_start+0x14c)[0x7f58b64a961c]
[0x7f58dd012d98]
======= Memory map: ========
00400000-00401000 r-xp 00000000 08:11 1212219 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
00600000-00601000 r--p 00000000 08:11 1212219 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
00601000-00602000 rw-p 00001000 08:11 1212219 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
00a18000-00a39000 rw-p 00000000 00:00 0 [heap]
</pre>


happen after I imported a "P1719" corpus, if I empty TXM corpora and let only the "P1719" corpus. There is no buffer overflow.

h3. Solution 1

it seems that the bug is provoked when the registry path argument is too long or when there is too much loaded corpus.

Find the buffer that fails fail and change its size.

h3. Solution 2

Expand the buffer size when full.

Back