Menu

Buffer overflow in hmm_vit_eval

Help
Kristoffer
2016-10-19
2016-10-21
  • Kristoffer

    Kristoffer - 2016-10-19

    Today I managed to crash my android test app. See crash info below. Please note that I have modified the RecognizerThread class. In its run() method I do stuff like this inside the loop, conditionallyof course:

    decoder.endUtt();
    decoder.setSearch(x);
    decoder.startUtt();
    ...
    recorder.read(...);

    I remember that I stressed the app a bit by saying lots of valid words in a very fast pace. Then boom! Could this be a hidden bug somewhere or are my three calls above dangerous to perform during recording?

    10-20 01:20:37.518 200 200 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xfee7a091
    10-20 01:20:37.531 200 200 F DEBUG : r0 9569cf28 r1 dfffff70 r2 0000005b r3 a03e5000
    10-20 01:20:37.531 200 200 F DEBUG : r4 fffffe95 r5 fee7a091 r6 e0000000 r7 e0000000
    10-20 01:20:37.531 200 200 F DEBUG : r8 dfffffa5 r9 00000500 sl b6d39ec0 fp a0a3a080
    10-20 01:20:37.531 200 200 F DEBUG : ip 000000a0 sp 93d7f294 lr 9fc10eb5 pc 9fc133ec cpsr 800d0010
    10-20 01:20:37.540 200 200 F DEBUG :
    10-20 01:20:37.540 200 200 F DEBUG : backtrace:
    10-20 01:20:37.541 200 200 F DEBUG : #00 pc 0001c3ec /data/app/myapp.debug-1/lib/arm/libpocketsphinx_jni.so (hmm_vit_eval+564)
    10-20 01:20:37.541 200 200 F DEBUG : #01 pc 00019eb1 /data/app/myapp.debug-1/lib/arm/libpocketsphinx_jni.so (fsg_search_step+120)
    10-20 01:20:37.541 200 200 F DEBUG : #02 pc 0001102f /data/app/myapp.debug-1/lib/arm/libpocketsphinx_jni.so
    10-20 01:20:37.541 200 200 F DEBUG : #03 pc 000120af /data/app/myapp.debug-1/lib/arm/libpocketsphinx_jni.so (ps_process_raw+82)
    10-20 01:20:37.541 200 200 F DEBUG : #04 pc 00010415 /data/app/myapp.debug-1/lib/arm/libpocketsphinx_jni.so (Java_edu_cmu_pocketsphinx_PocketSphinxJNI_Decoder_1processRaw+208)
    10-20 01:20:37.541 200 200 F DEBUG : #05 pc 00f34383 /data/app/myapp.debug-1/oat/arm/base.odex (offset 0x6e0000) (int edu.cmu.pocketsphinx.PocketSphinxJNI.Decoder_processRaw(long, edu.cmu.pocketsphinx.Decoder, short[], long, boolean, boolean)+174)
    10-20 01:20:37.541 200 200 F DEBUG : #06 pc 00f27523 /data/app/myapp.debug-1/oat/arm/base.odex (offset 0x6e0000) (int edu.cmu.pocketsphinx.Decoder.processRaw(short[], long, boolean, boolean)+366)
    10-20 01:20:37.541 200 200 F DEBUG : #07 pc 00f3dc81 /data/app/myapp.debug-1/oat/arm/base.odex (offset 0x6e0000) (void edu.cmu.pocketsphinx.SpeechRecognizer$RecognizerThread.run()+3924)
    10-20 01:20:37.541 200 200 F DEBUG : #08 pc 000e6331 /system/lib/libart.so (art_quick_invoke_stub_internal+64)
    10-20 01:20:37.541 200 200 F DEBUG : #09 pc 004028a5 /system/lib/libart.so (art_quick_invoke_stub+188)
    10-20 01:20:37.542 200 200 F DEBUG : #10 pc 00102774 [stack:20808]
    10-20 01:20:37.633 203 20788 W AudioFlinger: RecordThread: buffer overflow

     
    • Nickolay V. Shmyrev

      Hi Kristoffer

      There is nothing suspicious in the information you provided except the crash of course. Such issues are very hard to debug you know, corruption might be everywhere, not necessary in cmusphinx code. Please try if you can reproduce it frequently at least, also consider sharing your code so I can test here, it is hard to quess the issue from few lines.

      You might also try to reproduce the problem on desktop with small example.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.