Posted to tcl by oldlaptop at Tue Sep 14 13:00:22 GMT 2021view raw

  1. $ valgrind ./sqltclsh
  2. ==5160== Memcheck, a memory error detector
  3. ==5160== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
  4. ==5160== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info
  5. ==5160== Command: ./sqltclsh
  6. ==5160==
  7. % sqlite3 db :memory:
  8. % db transaction { db close }
  9. ==5160== Invalid read of size 1
  10. ==5160== at 0x144BB0: sqlite3SafetyCheckOk (sqltclsh.c:33318)
  11. ==5160== by 0x1A3411: sqlite3_exec (sqltclsh.c:126586)
  12. ==5160== by 0x1C6071: DbTransPostCmd (sqltclsh.c:240427)
  13. ==5160== by 0x48B0E31: TclNRRunCallbacks (in /usr/lib/libtcl8.6.so)
  14. ==5160== by 0x48B2CF3: ??? (in /usr/lib/libtcl8.6.so)
  15. ==5160== by 0x48B3462: Tcl_EvalEx (in /usr/lib/libtcl8.6.so)
  16. ==5160== by 0x48B3485: Tcl_Eval (in /usr/lib/libtcl8.6.so)
  17. ==5160== by 0x48B3B52: Tcl_GlobalEval (in /usr/lib/libtcl8.6.so)
  18. ==5160== by 0x113AAF: main (sqltclsh.c:243200)
  19. ==5160== Address 0x4de8f9d is 109 bytes inside a block of size 712 free'd
  20. ==5160== at 0x48399AB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  21. ==5160== by 0x1763C3: sqlite3Close (sqltclsh.c:166915)
  22. ==5160== by 0x1763C3: sqlite3Close (sqltclsh.c:166869)
  23. ==5160== by 0x1972DC: sqlite3_close (sqltclsh.c:166958)
  24. ==5160== by 0x1972DC: DbDeleteCmd (sqltclsh.c:239725)
  25. ==5160== by 0x48AEDD5: Tcl_DeleteCommandFromToken (in /usr/lib/libtcl8.6.so)
  26. ==5160== by 0x1CA502: DbObjCmd (sqltclsh.c:241416)
  27. ==5160== by 0x48B0E31: TclNRRunCallbacks (in /usr/lib/libtcl8.6.so)
  28. ==5160== by 0x48B2CF3: ??? (in /usr/lib/libtcl8.6.so)
  29. ==5160== by 0x48B3462: Tcl_EvalEx (in /usr/lib/libtcl8.6.so)
  30. ==5160== by 0x48B3485: Tcl_Eval (in /usr/lib/libtcl8.6.so)
  31. ==5160== by 0x48B3B52: Tcl_GlobalEval (in /usr/lib/libtcl8.6.so)
  32. ==5160== by 0x113AAF: main (sqltclsh.c:243200)
  33. ==5160== Block was alloc'd at
  34. ==5160== at 0x483877F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  35. ==5160== by 0x143AE2: sqlite3MemMalloc (sqltclsh.c:24557)
  36. ==5160== by 0x125767: sqlite3Malloc (sqltclsh.c:28283)
  37. ==5160== by 0x125767: sqlite3Malloc (sqltclsh.c:28269)
  38. ==5160== by 0x125767: sqlite3MallocZero (sqltclsh.c:28522)
  39. ==5160== by 0x1919BE: openDatabase (sqltclsh.c:168845)
  40. ==5160== by 0x1922FB: sqlite3_open_v2 (sqltclsh.c:169130)
  41. ==5160== by 0x1922FB: DbMain (sqltclsh.c:243013)
  42. ==5160== by 0x48B0E31: TclNRRunCallbacks (in /usr/lib/libtcl8.6.so)
  43. ==5160== by 0x48B2CF3: ??? (in /usr/lib/libtcl8.6.so)
  44. ==5160== by 0x48B3462: Tcl_EvalEx (in /usr/lib/libtcl8.6.so)
  45. ==5160== by 0x48B3485: Tcl_Eval (in /usr/lib/libtcl8.6.so)
  46. ==5160== by 0x48B3B52: Tcl_GlobalEval (in /usr/lib/libtcl8.6.so)
  47. ==5160== by 0x113AAF: main (sqltclsh.c:243200)
  48. ==5160==
  49. ==5160== Invalid read of size 1
  50. ==5160== at 0x144C21: sqlite3SafetyCheckSickOrOk (sqltclsh.c:33331)
  51. ==5160== by 0x144C21: sqlite3_errmsg (sqltclsh.c:168219)
  52. ==5160== by 0x1C608F: DbTransPostCmd (sqltclsh.c:240439)
  53. ==5160== by 0x48B0E31: TclNRRunCallbacks (in /usr/lib/libtcl8.6.so)
  54. ==5160== by 0x48B2CF3: ??? (in /usr/lib/libtcl8.6.so)
  55. ==5160== by 0x48B3462: Tcl_EvalEx (in /usr/lib/libtcl8.6.so)
  56. ==5160== by 0x48B3485: Tcl_Eval (in /usr/lib/libtcl8.6.so)
  57. ==5160== by 0x48B3B52: Tcl_GlobalEval (in /usr/lib/libtcl8.6.so)
  58. ==5160== by 0x113AAF: main (sqltclsh.c:243200)
  59. ==5160== Address 0x4de8f9d is 109 bytes inside a block of size 712 free'd
  60. ==5160== at 0x48399AB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  61. ==5160== by 0x1763C3: sqlite3Close (sqltclsh.c:166915)
  62. ==5160== by 0x1763C3: sqlite3Close (sqltclsh.c:166869)
  63. ==5160== by 0x1972DC: sqlite3_close (sqltclsh.c:166958)
  64. ==5160== by 0x1972DC: DbDeleteCmd (sqltclsh.c:239725)
  65. ==5160== by 0x48AEDD5: Tcl_DeleteCommandFromToken (in /usr/lib/libtcl8.6.so)
  66. ==5160== by 0x1CA502: DbObjCmd (sqltclsh.c:241416)
  67. ==5160== by 0x48B0E31: TclNRRunCallbacks (in /usr/lib/libtcl8.6.so)
  68. ==5160== by 0x48B2CF3: ??? (in /usr/lib/libtcl8.6.so)
  69. ==5160== by 0x48B3462: Tcl_EvalEx (in /usr/lib/libtcl8.6.so)
  70. ==5160== by 0x48B3485: Tcl_Eval (in /usr/lib/libtcl8.6.so)
  71. ==5160== by 0x48B3B52: Tcl_GlobalEval (in /usr/lib/libtcl8.6.so)
  72. ==5160== by 0x113AAF: main (sqltclsh.c:243200)
  73. ==5160== Block was alloc'd at
  74. ==5160== at 0x483877F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  75. ==5160== by 0x143AE2: sqlite3MemMalloc (sqltclsh.c:24557)
  76. ==5160== by 0x125767: sqlite3Malloc (sqltclsh.c:28283)
  77. ==5160== by 0x125767: sqlite3Malloc (sqltclsh.c:28269)
  78. ==5160== by 0x125767: sqlite3MallocZero (sqltclsh.c:28522)
  79. ==5160== by 0x1919BE: openDatabase (sqltclsh.c:168845)
  80. ==5160== by 0x1922FB: sqlite3_open_v2 (sqltclsh.c:169130)
  81. ==5160== by 0x1922FB: DbMain (sqltclsh.c:243013)
  82. ==5160== by 0x48B0E31: TclNRRunCallbacks (in /usr/lib/libtcl8.6.so)
  83. ==5160== by 0x48B2CF3: ??? (in /usr/lib/libtcl8.6.so)
  84. ==5160== by 0x48B3462: Tcl_EvalEx (in /usr/lib/libtcl8.6.so)
  85. ==5160== by 0x48B3485: Tcl_Eval (in /usr/lib/libtcl8.6.so)
  86. ==5160== by 0x48B3B52: Tcl_GlobalEval (in /usr/lib/libtcl8.6.so)
  87. ==5160== by 0x113AAF: main (sqltclsh.c:243200)
  88. ==5160==
  89. ==5160== Invalid read of size 1
  90. ==5160== at 0x144BB0: sqlite3SafetyCheckOk (sqltclsh.c:33318)
  91. ==5160== by 0x1A3411: sqlite3_exec (sqltclsh.c:126586)
  92. ==5160== by 0x1C60BA: DbTransPostCmd (sqltclsh.c:240442)
  93. ==5160== by 0x48B0E31: TclNRRunCallbacks (in /usr/lib/libtcl8.6.so)
  94. ==5160== by 0x48B2CF3: ??? (in /usr/lib/libtcl8.6.so)
  95. ==5160== by 0x48B3462: Tcl_EvalEx (in /usr/lib/libtcl8.6.so)
  96. ==5160== by 0x48B3485: Tcl_Eval (in /usr/lib/libtcl8.6.so)
  97. ==5160== by 0x48B3B52: Tcl_GlobalEval (in /usr/lib/libtcl8.6.so)
  98. ==5160== by 0x113AAF: main (sqltclsh.c:243200)
  99. ==5160== Address 0x4de8f9d is 109 bytes inside a block of size 712 free'd
  100. ==5160== at 0x48399AB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  101. ==5160== by 0x1763C3: sqlite3Close (sqltclsh.c:166915)
  102. ==5160== by 0x1763C3: sqlite3Close (sqltclsh.c:166869)
  103. ==5160== by 0x1972DC: sqlite3_close (sqltclsh.c:166958)
  104. ==5160== by 0x1972DC: DbDeleteCmd (sqltclsh.c:239725)
  105. ==5160== by 0x48AEDD5: Tcl_DeleteCommandFromToken (in /usr/lib/libtcl8.6.so)
  106. ==5160== by 0x1CA502: DbObjCmd (sqltclsh.c:241416)
  107. ==5160== by 0x48B0E31: TclNRRunCallbacks (in /usr/lib/libtcl8.6.so)
  108. ==5160== by 0x48B2CF3: ??? (in /usr/lib/libtcl8.6.so)
  109. ==5160== by 0x48B3462: Tcl_EvalEx (in /usr/lib/libtcl8.6.so)
  110. ==5160== by 0x48B3485: Tcl_Eval (in /usr/lib/libtcl8.6.so)
  111. ==5160== by 0x48B3B52: Tcl_GlobalEval (in /usr/lib/libtcl8.6.so)
  112. ==5160== by 0x113AAF: main (sqltclsh.c:243200)
  113. ==5160== Block was alloc'd at
  114. ==5160== at 0x483877F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  115. ==5160== by 0x143AE2: sqlite3MemMalloc (sqltclsh.c:24557)
  116. ==5160== by 0x125767: sqlite3Malloc (sqltclsh.c:28283)
  117. ==5160== by 0x125767: sqlite3Malloc (sqltclsh.c:28269)
  118. ==5160== by 0x125767: sqlite3MallocZero (sqltclsh.c:28522)
  119. ==5160== by 0x1919BE: openDatabase (sqltclsh.c:168845)
  120. ==5160== by 0x1922FB: sqlite3_open_v2 (sqltclsh.c:169130)
  121. ==5160== by 0x1922FB: DbMain (sqltclsh.c:243013)
  122. ==5160== by 0x48B0E31: TclNRRunCallbacks (in /usr/lib/libtcl8.6.so)
  123. ==5160== by 0x48B2CF3: ??? (in /usr/lib/libtcl8.6.so)
  124. ==5160== by 0x48B3462: Tcl_EvalEx (in /usr/lib/libtcl8.6.so)
  125. ==5160== by 0x48B3485: Tcl_Eval (in /usr/lib/libtcl8.6.so)
  126. ==5160== by 0x48B3B52: Tcl_GlobalEval (in /usr/lib/libtcl8.6.so)
  127. ==5160== by 0x113AAF: main (sqltclsh.c:243200)
  128. ==5160==
  129. Error: bad parameter or other API misuse
  130. % ==5160==
  131. ==5160== HEAP SUMMARY:
  132. ==5160== in use at exit: 438,676 bytes in 41 blocks
  133. ==5160== total heap usage: 148 allocs, 107 frees, 516,661 bytes allocated
  134. ==5160==
  135. ==5160== LEAK SUMMARY:
  136. ==5160== definitely lost: 0 bytes in 0 blocks
  137. ==5160== indirectly lost: 0 bytes in 0 blocks
  138. ==5160== possibly lost: 404,480 bytes in 22 blocks
  139. ==5160== still reachable: 34,196 bytes in 19 blocks
  140. ==5160== suppressed: 0 bytes in 0 blocks
  141. ==5160== Rerun with --leak-check=full to see details of leaked memory
  142. ==5160==
  143. ==5160== For lists of detected and suppressed errors, rerun with: -s
  144. ==5160== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)