[sword-devel] Unusual behavior from diatheke on Linux with musl libc

Isaac Dunham ibid.ag at gmail.com
Wed Jul 9 23:07:17 MST 2014


On Thu, Jul 10, 2014 at 08:44:00AM +0300, Jaak Ristioja wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Yes, the full version might be helpful. Please send it.
> 
> God bless!
> Jaak

I'm attaching a zip of it.

God bless,
Isaac Dunham

> 
> On 10.07.2014 07:36, Isaac Dunham wrote:
> > On Tue, Jul 08, 2014 at 05:33:54PM +0300, Jaak Ristioja wrote:
> >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
> >> 
> >> Looking at corediatheke.cpp this is probably a bug which could
> >> be found using valgrind. Please try the following command with
> >> sword+musl:
> >> 
> >> valgrind --leak-check=full --track-origins=yes -
> >> --keep-stacktraces=alloc-and-free utils\diatheke -b KJV -k Ps117
> >> 
> >> Blessings, Jaak
> > 
> > Thank you for the recommendation.
> > 
> > I found it necessary to adjust this to:
> > 
> > $ valgrind --leak-check=full --track-origins=yes \ 
> > --keep-stacktraces=alloc-and-free /lib/ld-musl-i386.so.1 \ 
> > utilities/diatheke/.libs/diatheke  -b KJV -k Ps117 \
> >> /tmp/ram/musl-diatheke.txt 2>&1
> > 
> > 
> > The resulting log is very large (>5k lines), and I don't see any
> > obvious problems. (Not that I'd be likely to!) If desired, I can
> > attach a zipped or bzipped version. Following is the part (~80
> > lines) that's most likely to be interesting.
> > 
> > Thank you, Isaac Dunham
> > 
> > ==4701==    by 0x4809CBA:
> > DiathekeMgr::DiathekeMgr(sword::SWConfig*, sword::SWConfig*, bool,
> > char, char, bool, bool) (diathekemgr.cpp:40) ==4701==    by
> > 0x48074CE: doquery(unsigned long, unsigned char, unsigned char,
> > unsigned long, unsigned char, char const*, char const*, char
> > const*, char const*, std::ostream*, char const*, signed char)
> > (corediatheke.cpp:117) ==4701==    by 0x480452F: main
> > (diatheke.cpp:286) ==4701== ==4701== Conditional jump or move
> > depends on uninitialised value(s) ==4701==    at 0x1297FE: calloc
> > (calloc.c:19) ==4701==    by 0x485D864:
> > sword::ListKey::add(sword::SWKey const&) (in
> > /usr/lib/libsword-1.7.3.so) ==4701==    by 0x4865BD6:
> > sword::ListKey::operator<<(sword::SWKey const&) (in
> > /usr/lib/libsword-1.7.3.so) ==4701==    by 0x4864F4D:
> > sword::VerseKey::parseVerseList(char const*, char const*, bool,
> > bool) (in /usr/lib/libsword-1.7.3.so) ==4701==    by 0x486366E:
> > sword::VerseKey::parse(bool) (in /usr/lib/libsword-1.7.3.so) 
> > ==4701==    by 0x4865CCD: sword::VerseKey::setText(char const*) (in
> > /usr/lib/libsword-1.7.3.so) ==4701==    by 0x4863D17:
> > sword::VerseKey::parseVerseList(char const*, char const*, bool,
> > bool) (in /usr/lib/libsword-1.7.3.so) ==4701==    by 0x4807F21:
> > doquery(unsigned long, unsigned char, unsigned char, unsigned long,
> > unsigned char, char const*, char const*, char const*, char const*,
> > std::ostream*, char const*, signed char) (corediatheke.cpp:386) 
> > ==4701==    by 0x480452F: main (diatheke.cpp:286) ==4701==
> > Uninitialised value was created ==4701==    at 0x12385D: ???
> > (syscall.s:35) ==4701==    by 0x12A488: malloc (malloc.c:379) 
> > ==4701==    by 0x48094E5: sword::SWBuf::assureSize(unsigned int)
> > (swbuf.h:62) ==4701==    by 0x48691FE:
> > sword::SWBuf::SWBuf(sword::SWBuf const&, unsigned long) (in
> > /usr/lib/libsword-1.7.3.so) ==4701==    by 0x486D5C6: ??? (in
> > /usr/lib/libsword-1.7.3.so) ==4701==    by 0x486E6D2:
> > std::_Rb_tree<sword::SWBuf, std::pair<sword::SWBuf const,
> > sword::SWBuf>, std::_Select1st<std::pair<sword::SWBuf const,
> > sword::SWBuf> >, std::less<sword::SWBuf>,
> > std::allocator<std::pair<sword::SWBuf const, sword::SWBuf> >
> > >::_M_insert_equal(std::pair<sword::SWBuf const, sword::SWBuf>
> > const&) (in /usr/lib/libsword-1.7.3.so) ==4701==    by 0x486DE24:
> > sword::SWConfig::Load() (in /usr/lib/libsword-1.7.3.so) ==4701==
> > by 0x486E060: sword::SWConfig::SWConfig(char const*) (in
> > /usr/lib/libsword-1.7.3.so) ==4701==    by 0x487E967:
> > sword::SWLocale::SWLocale(char const*) (in
> > /usr/lib/libsword-1.7.3.so) ==4701==    by 0x487FBC9:
> > sword::LocaleMgr::loadConfigDir(char const*) (in
> > /usr/lib/libsword-1.7.3.so) ==4701==    by 0x4880245:
> > sword::LocaleMgr::LocaleMgr(char const*) (in
> > /usr/lib/libsword-1.7.3.so) ==4701==    by 0x488045B:
> > sword::LocaleMgr::getSystemLocaleMgr() (in
> > /usr/lib/libsword-1.7.3.so) ==4701== ==4701== Conditional jump or
> > move depends on uninitialised value(s) ==4701==    at 0x1297FE:
> > calloc (calloc.c:19) ==4701==    by 0x4891599:
> > sword::ZipCompress::Decode() (in /usr/lib/libsword-1.7.3.so) 
> > ==4701==    by 0x4890801: sword::SWCompress::Buf(char const*,
> > unsigned long*) (in /usr/lib/libsword-1.7.3.so) ==4701==    by
> > 0x489485F: sword::zVerse::zReadText(char, long, unsigned short,
> > unsigned long, sword::SWBuf&) const (in
> > /usr/lib/libsword-1.7.3.so) ==4701==    by 0x48E3863:
> > sword::zText::getRawEntryBuf() const (in
> > /usr/lib/libsword-1.7.3.so) ==4701==    by 0x4887B00:
> > sword::SWModule::renderText(char const*, int, bool) (in
> > /usr/lib/libsword-1.7.3.so) ==4701==    by 0x4808734:
> > doquery(unsigned long, unsigned char, unsigned char, unsigned long,
> > unsigned char, char const*, char const*, char const*, char const*,
> > std::ostream*, char const*, signed char) (corediatheke.cpp:424) 
> > ==4701==    by 0x480452F: main (diatheke.cpp:286) ==4701==
> > Uninitialised value was created ==4701==    at 0x12385D: ???
> > (syscall.s:35) ==4701==    by 0x12A488: malloc (malloc.c:379) 
> > ==4701==    by 0x48094E5: sword::SWBuf::assureSize(unsigned int)
> > (swbuf.h:62) ==4701==    by 0x48691FE:
> > sword::SWBuf::SWBuf(sword::SWBuf const&, unsigned long) (in
> > /usr/lib/libsword-1.7.3.so) ==4701==    by 0x486D5C6: ??? (in
> > /usr/lib/libsword-1.7.3.so) ==4701==    by 0x486E6D2:
> > std::_Rb_tree<sword::SWBuf, std::pair<sword::SWBuf const,
> > sword::SWBuf>, std::_Select1st<std::pair<sword::SWBuf const,
> > sword::SWBuf> >, std::less<sword::SWBuf>,
> > std::allocator<std::pair<sword::SWBuf const, sword::SWBuf> >
> > >::_M_insert_equal(std::pair<sword::SWBuf const, sword::SWBuf>
> > const&) (in /usr/lib/libsword-1.7.3.so) ==4701==    by 0x486DE24:
> > sword::SWConfig::Load() (in /usr/lib/libsword-1.7.3.so) ==4701==
> > by 0x486E060: sword::SWConfig::SWConfig(char const*) (in
> > /usr/lib/libsword-1.7.3.so) ==4701==    by 0x487E967:
> > sword::SWLocale::SWLocale(char const*) (in
> > /usr/lib/libsword-1.7.3.so) ==4701==    by 0x487FBC9:
> > sword::LocaleMgr::loadConfigDir(char const*) (in
> > /usr/lib/libsword-1.7.3.so) ==4701==    by 0x4880245:
> > sword::LocaleMgr::LocaleMgr(char const*) (in
> > /usr/lib/libsword-1.7.3.so) ==4701==    by 0x488045B:
> > sword::LocaleMgr::getSystemLocaleMgr() (in
> > /usr/lib/libsword-1.7.3.so) ==4701== Psalms 117:1: O praise the
> > LORD, all ye nations: praise him, all ye people. ==4701==
> > Conditional jump or move depends on uninitialised value(s) ==4701==
> > at 0x1214DF: __funcs_on_exit (atexit.c:23) ==4701==    by 0x121625:
> > exit (exit.c:22) ==4701==    by 0x120E1A: (below main)
> > (__libc_start_main.c:76) ==4701==  Uninitialised value was created 
> > ==4701==    at 0x12385D: ??? (syscall.s:35) ==4701==    by
> > 0x12A488: malloc (malloc.c:379) ==4701==    by 0x48094E5:
> > sword::SWBuf::assureSize(unsigned int) (swbuf.h:62) ==4701==    by
> > 0x48691FE: sword::SWBuf::SWBuf(sword::SWBuf const&, unsigned long)
> > (in /usr/lib/libsword-1.7.3.so) ==4701==    by 0x48777FB:
> > std::_Rb_tree<sword::SWBuf, std::pair<sword::SWBuf const,
> > sword::SWOptionFilter*>, std::_Select1st<std::pair<sword::SWBuf
> > const, sword::SWOptionFilter*> >, std::less<sword::SWBuf>,
> > std::allocator<std::pair<sword::SWBuf const,
> > sword::SWOptionFilter*> >
> > >::_M_insert_unique(std::pair<sword::SWBuf const,
> > sword::SWOptionFilter*> const&) (in /usr/lib/libsword-1.7.3.so) 
> > ==4701==    by 0x48702D3: sword::SWMgr::init() (in
> > /usr/lib/libsword-1.7.3.so) ==4701==    by 0x486F889:
> > sword::SWMgr::commonInit(sword::SWConfig*, sword::SWConfig*, bool,
> > sword::SWFilterMgr*, bool) (in /usr/lib/libsword-1.7.3.so) ==4701==
> > by 0x48748B9: sword::SWMgr::SWMgr(sword::SWConfig*,
> > sword::SWConfig*, bool, sword::SWFilterMgr*, bool) (in
> > /usr/lib/libsword-1.7.3.so) ==4701==    by 0x4809CBA:
> > DiathekeMgr::DiathekeMgr(sword::SWConfig*, sword::SWConfig*, bool,
> > char, char, bool, bool) (diathekemgr.cpp:40) ==4701==    by
> > 0x48074CE: doquery(unsigned long, unsigned char, unsigned char,
> > unsigned long, unsigned char, char const*, char const*, char
> > const*, char const*, std::ostream*, char const*, signed char)
> > (corediatheke.cpp:117) ==4701==    by 0x480452F: main
> > (diatheke.cpp:286) ==4701== Psalms 117:2: For his merciful kindness
> > is great toward us: and the truth of the LORD endureth for ever.
> > Praise ye the LORD. : For his merciful kindness is great toward us:
> > and the truth of the LORD endureth for ever. Praise ye the LORD. 
> > (KJV) ==4701== ==4701== HEAP SUMMARY: ==4701==     in use at exit:
> > 0 bytes in 0 blocks ==4701==   total heap usage: 0 allocs, 0 frees,
> > 0 bytes allocated ==4701== ==4701== All heap blocks were freed --
> > no leaks are possible
> > 
> > 
> > 
> > _______________________________________________ sword-devel mailing
> > list: sword-devel at crosswire.org 
> > http://www.crosswire.org/mailman/listinfo/sword-devel Instructions
> > to unsubscribe/change your settings at above page
> >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xh0zc
> Vr2qbOJGsTEtKW4sSlue/o32kWfYbziu3H4+uzqTWH+Oo3lfmRUYU3Vw1rywl+js
> Hc4tbS/aANnAWpLEw8/8A+PYx+qqxD19pMP6vYeYl/+TQSnY2MGnZdcXqobqAhSB
> m0ebUmqMgirupWDPr4fDXyQ6SVhwW67sY1j+ADYGp0m5GqDGntpx/AbegAAxptSn
> YihlzrT4JtVSJySqPvCkimvjKhcSKf+lmutXdM6imHRspCosGuWE1oopdeztP+Xb
> N+Ec3AiyTk1mdx7+48fHKsC1Dn/SVsrN74eRrN0stiLZEjbr7WMSrT7OgD9VbwP1
> NwPu3Z9N1WZtzL13NvE022lxxLSu5HDuAMsKxaPdjxdexbCBEah90KTGkxi7KLf+
> blykD31+WpP2kNhFjNh4yT6Q4QUhxM1QgBcSx+LCsK+8mSE69acLW3N40McVU2Qi
> FcpqIKS/+cO4U+dSE7WmCa9FtO5w0clo6ERIkoGJc9IW7eg1khDWuqUMDbLaZMeM
> vgNy3vKGdqlKj0DFIOdBoWjsTbAc2hbE4yrHSY/qlM/DfNnVE226a1v2pYG5WnBp
> MZK2dNpfDPcdnxJ+1nfyLf6N0GWgorL9TQUqDbVldiuYz/YwJ1nNRwGsYRtF6toi
> YMjivMSfvPbHDUzer3M/Psi9X8BHcO2o7vQYTTzBpzwgIE/pjPmqUqjvteowQ3O7
> sRDFS5i+k1ELYY1IdHBY
> =rQga
> -----END PGP SIGNATURE-----
> 
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diatheke-err.zip
Type: application/octet-stream
Size: 6723 bytes
Desc: not available
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20140709/c6439b75/attachment-0001.obj>


More information about the sword-devel mailing list