#14 Suspicious memcheck report regarding XML schema loading

open
hidrd (14)
5
2010-05-27
2010-05-27
No

The following is seen with hidrd 0.2.0:

nick@pippin:~/hidrd$ valgrind --track-origins=yes hidrd-convert -o xml --oo schema=/home/nick/tmp/install/share/xml/schema/hidrd.xsd uc-logic_tablet_wp8060u.bin /dev/null
==13349== Memcheck, a memory error detector
==13349== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==13349== Using Valgrind-3.5.0-Debian and LibVEX; rerun with -h for copyright info
==13349== Command: hidrd-convert -o xml --oo schema=/home/nick/tmp/install/share/xml/schema/hidrd.xsd uc-logic_tablet_wp8060u.bin /dev/null
==13349==
==13349== Conditional jump or move depends on uninitialised value(s)
==13349== at 0x42E9A2E: inflateReset2 (in /usr/lib/libz.so.1.2.3.4)
==13349== by 0x42E9B0C: inflateInit2_ (in /usr/lib/libz.so.1.2.3.4)
==13349== by 0x42E33A9: ??? (in /usr/lib/libz.so.1.2.3.4)
==13349== by 0x41F45BA: ??? (in /usr/lib/libxml2.so.2.7.7)
==13349== by 0x41F45E3: ??? (in /usr/lib/libxml2.so.2.7.7)
==13349== by 0x41F3F4A: __xmlParserInputBufferCreateFilename (in /usr/lib/libxml2.so.2.7.7)
==13349== by 0x41F4043: xmlParserInputBufferCreateFilename (in /usr/lib/libxml2.so.2.7.7)
==13349== by 0x41C8890: xmlNewInputFromFile (in /usr/lib/libxml2.so.2.7.7)
==13349== by 0x41F4ECE: xmlNoNetExternalEntityLoader (in /usr/lib/libxml2.so.2.7.7)
==13349== by 0x41F4FE6: ??? (in /usr/lib/libxml2.so.2.7.7)
==13349== by 0x41F4482: xmlLoadExternalEntity (in /usr/lib/libxml2.so.2.7.7)
==13349== by 0x41CCF30: xmlCreateURLParserCtxt (in /usr/lib/libxml2.so.2.7.7)
==13349== Uninitialised value was created by a heap allocation
==13349== at 0x4024C4C: malloc (vg_replace_malloc.c:195)
==13349== by 0x42E9910: ??? (in /usr/lib/libz.so.1.2.3.4)
==13349== by 0x42E9AE8: inflateInit2_ (in /usr/lib/libz.so.1.2.3.4)
==13349== by 0x42E33A9: ??? (in /usr/lib/libz.so.1.2.3.4)
==13349== by 0x41F45BA: ??? (in /usr/lib/libxml2.so.2.7.7)
==13349== by 0x41F45E3: ??? (in /usr/lib/libxml2.so.2.7.7)
==13349== by 0x41F3F4A: __xmlParserInputBufferCreateFilename (in /usr/lib/libxml2.so.2.7.7)
==13349== by 0x41F4043: xmlParserInputBufferCreateFilename (in /usr/lib/libxml2.so.2.7.7)
==13349== by 0x41C8890: xmlNewInputFromFile (in /usr/lib/libxml2.so.2.7.7)
==13349== by 0x41F4ECE: xmlNoNetExternalEntityLoader (in /usr/lib/libxml2.so.2.7.7)
==13349== by 0x41F4FE6: ??? (in /usr/lib/libxml2.so.2.7.7)
==13349== by 0x41F4482: xmlLoadExternalEntity (in /usr/lib/libxml2.so.2.7.7)
==13349==
==13349==
==13349== HEAP SUMMARY:
==13349== in use at exit: 0 bytes in 0 blocks
==13349== total heap usage: 23,232 allocs, 23,232 frees, 1,501,519 bytes allocated
==13349==
==13349== All heap blocks were freed -- no leaks are possible
==13349==
==13349== For counts of detected and suppressed errors, rerun with: -v
==13349== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 31 from 6)

Discussion

  • Nikolai Kondrashov

    The same is seen on XML input.

     
  • Nikolai Kondrashov

    • summary: Suspicious valgrind report with output XML schema --> Suspicious memcheck report regarding XML schema loading
     
  • Nikolai Kondrashov

    A similar backtrace is seen when just validating with xmllint:
    nick@pippin:~/hidrd$ valgrind --track-origins=yes xmllint --schema /home/nick/tmp/install/share/xml/schema/hidrd.xsd -o /dev/null uc-logic_tablet_wp8060u.xml
    ==13580== Memcheck, a memory error detector
    ==13580== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
    ==13580== Using Valgrind-3.5.0-Debian and LibVEX; rerun with -h for copyright info
    ==13580== Command: xmllint --schema /home/nick/tmp/install/share/xml/schema/hidrd.xsd -o /dev/null uc-logic_tablet_wp8060u.xml
    ==13580==
    ==13580== Conditional jump or move depends on uninitialised value(s)
    ==13580== at 0x432AA2E: inflateReset2 (in /usr/lib/libz.so.1.2.3.4)
    ==13580== by 0x432AB0C: inflateInit2_ (in /usr/lib/libz.so.1.2.3.4)
    ==13580== by 0x43243A9: ??? (in /usr/lib/libz.so.1.2.3.4)
    ==13580== by 0x40C25BA: ??? (in /usr/lib/libxml2.so.2.7.7)
    ==13580== by 0x40C25E3: ??? (in /usr/lib/libxml2.so.2.7.7)
    ==13580== by 0x40C1F4A: __xmlParserInputBufferCreateFilename (in /usr/lib/libxml2.so.2.7.7)
    ==13580== by 0x40C2043: xmlParserInputBufferCreateFilename (in /usr/lib/libxml2.so.2.7.7)
    ==13580== by 0x4096890: xmlNewInputFromFile (in /usr/lib/libxml2.so.2.7.7)
    ==13580== by 0x80520AE: ??? (in /usr/bin/xmllint)
    ==13580== by 0x40C2482: xmlLoadExternalEntity (in /usr/lib/libxml2.so.2.7.7)
    ==13580== by 0x40B19D0: xmlCtxtReadFile (in /usr/lib/libxml2.so.2.7.7)
    ==13580== by 0x41232C2: ??? (in /usr/lib/libxml2.so.2.7.7)
    ==13580== Uninitialised value was created by a heap allocation
    ==13580== at 0x4024C4C: malloc (vg_replace_malloc.c:195)
    ==13580== by 0x432A910: ??? (in /usr/lib/libz.so.1.2.3.4)
    ==13580== by 0x432AAE8: inflateInit2_ (in /usr/lib/libz.so.1.2.3.4)
    ==13580== by 0x43243A9: ??? (in /usr/lib/libz.so.1.2.3.4)
    ==13580== by 0x40C25BA: ??? (in /usr/lib/libxml2.so.2.7.7)
    ==13580== by 0x40C25E3: ??? (in /usr/lib/libxml2.so.2.7.7)
    ==13580== by 0x40C1F4A: __xmlParserInputBufferCreateFilename (in /usr/lib/libxml2.so.2.7.7)
    ==13580== by 0x40C2043: xmlParserInputBufferCreateFilename (in /usr/lib/libxml2.so.2.7.7)
    ==13580== by 0x4096890: xmlNewInputFromFile (in /usr/lib/libxml2.so.2.7.7)
    ==13580== by 0x80520AE: ??? (in /usr/bin/xmllint)
    ==13580== by 0x40C2482: xmlLoadExternalEntity (in /usr/lib/libxml2.so.2.7.7)
    ==13580== by 0x40B19D0: xmlCtxtReadFile (in /usr/lib/libxml2.so.2.7.7)
    ==13580==
    uc-logic_tablet_wp8060u.xml validates
    ==13580==
    ==13580== HEAP SUMMARY:
    ==13580== in use at exit: 0 bytes in 0 blocks
    ==13580== total heap usage: 22,748 allocs, 22,748 frees, 1,492,976 bytes allocated
    ==13580==
    ==13580== All heap blocks were freed -- no leaks are possible
    ==13580==
    ==13580== For counts of detected and suppressed errors, rerun with: -v
    ==13580== ERROR SUMMARY: 2 errors from 1 contexts (suppressed: 23 from 6)

    So this very well could be a libxml2 issue.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks