Skip to content
Tcl Source Code History Of Ticket 26960060d75e13b7
Login

History Of Ticket 26960060d75e13b7

Artifacts Associated With Ticket 26960060d75e13b7

  1. Ticket change [dbcfab36ed] (rid 215904) by chrstphrchvz on 2023-06-25 19:58:54:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      Occurs after tests are run. Does not seem to occur on 64-bit. Introduced by [97cc33cd20fd]. AddressSanitizer (<tt>-DPURIFY -fsanitize=address</tt>) output:
      
      <pre>
      ==11283==ERROR: AddressSanitizer: heap-use-after-free on address 0xad4221b4 at pc 0xb60e0de8 bp 0xbfd96a48 sp 0xbfd96a38
      READ of size 4 at 0xad4221b4 thread T0
          #0 0xb60e0de7 in Tcl_AppendObjToObj tcl87/generic/tclStringObj.c:1790
          #1 0xb618eaab in Tcl_GetVariableFullName tcl87/generic/tclVar.c:4975
          #2 0xb61923a3 in TclDeleteNamespaceVars tcl87/generic/tclVar.c:5472
          #3 0xb5fde359 in TclTeardownNamespace tcl87/generic/tclNamesp.c:1199
          #4 0xb56fe6c4 in DeleteInterpProc tcl87/generic/tclBasic.c:1913
          #5 0xb607f9f6 in Tcl_Release tcl87/generic/tclPreserve.c:228
          #6 0xb5fd68f3 in FreeMainInterp tcl87/generic/tclMain.c:923
          #7 0xb5d6b689 in InvokeExitHandlers tcl87/generic/tclEvent.c:936
          #8 0xb5d6b82d in Tcl_Finalize tcl87/generic/tclEvent.c:1208
          #9 0xb5d6b752 in Tcl_Exit tcl87/generic/tclEvent.c:993
          #10 0xb5793245 in Tcl_ExitObjCmd tcl87/generic/tclCmdAH.c:1145
          #11 0xb571b89b in Dispatch tcl87/generic/tclBasic.c:4996
          #12 0xb571bca1 in TclNRRunCallbacks tcl87/generic/tclBasic.c:5036
          #13 0xb572e044 in TclEvalObjEx tcl87/generic/tclBasic.c:6610
          #14 0xb572deeb in Tcl_EvalObjEx tcl87/generic/tclBasic.c:6591
          #15 0xb5fd4df0 in Tcl_MainEx tcl87/generic/tclMain.c:609
          #16 0x52b5f3 in main tcl87/unix/tclAppInit.c:94
          #17 0xb4e25628  (/usr/lib/libc.so.6+0x1f628)
          #18 0xb4e256ec in __libc_start_main (/usr/lib/libc.so.6+0x1f6ec)
          #19 0x52b3fa in _start (tcl87/unix/tcltest+0x483fa)
      
      0xad4221b4 is located 4 bytes inside of 24-byte region &#91;0xad4221b0,0xad4221c8)
      freed by thread T0 here:
          #0 0xb78c0f61 in __interceptor_free /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:52
          #1 0xb56be305 in TclpFree tcl87/generic/tclAlloc.c:722
          #2 0xb6007745 in TclFreeObj tcl87/generic/tclObj.c:1483
          #3 0xb61802da in ArrayForLoopCallback tcl87/generic/tclVar.c:3347
          #4 0xb571bca1 in TclNRRunCallbacks tcl87/generic/tclBasic.c:5036
          #5 0xb57185b2 in Tcl_EvalObjv tcl87/generic/tclBasic.c:4755
          #6 0xb5729408 in TclEvalEx tcl87/generic/tclBasic.c:5912
          #7 0xb5f6c446 in Tcl_FSEvalFileEx tcl87/generic/tclIOUtil.c:1782
          #8 0xb5fd2ec7 in Tcl_MainEx tcl87/generic/tclMain.c:405
          #9 0x52b5f3 in main tcl87/unix/tclAppInit.c:94
          #10 0xb4e25628  (/usr/lib/libc.so.6+0x1f628)
      
      previously allocated by thread T0 here:
          #0 0xb78c2315 in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:69
          #1 0xb56be2df in TclpAlloc tcl87/generic/tclAlloc.c:699
          #2 0xb5778714 in Tcl_Alloc tcl87/generic/tclCkalloc.c:1037
          #3 0xb601469a in Tcl_NewWideIntObj tcl87/generic/tclObj.c:3333
          #4 0xb56c2e6c in TclArithSeriesObjIndex tcl87/generic/tclArithSeries.c:451
          #5 0xb5fbca28 in SetListFromAny tcl87/generic/tclListObj.c:3273
          #6 0xb6006573 in Tcl_ConvertToType tcl87/generic/tclObj.c:986
          #7 0xb60092f6 in SetDuplicatePureObj tcl87/generic/tclObj.c:1652
          #8 0xb600a009 in TclDuplicatePureObj tcl87/generic/tclObj.c:1701
          #9 0xb617debc in ArrayForNRCmd tcl87/generic/tclVar.c:3224
          #10 0xb571b89b in Dispatch tcl87/generic/tclBasic.c:4996
          #11 0xb571bca1 in TclNRRunCallbacks tcl87/generic/tclBasic.c:5036
          #12 0xb57185b2 in Tcl_EvalObjv tcl87/generic/tclBasic.c:4755
          #13 0xb5729408 in TclEvalEx tcl87/generic/tclBasic.c:5912
          #14 0xb5f6c446 in Tcl_FSEvalFileEx tcl87/generic/tclIOUtil.c:1782
          #15 0xb5fd2ec7 in Tcl_MainEx tcl87/generic/tclMain.c:405
          #16 0x52b5f3 in main tcl87/unix/tclAppInit.c:94
          #17 0xb4e25628  (/usr/lib/libc.so.6+0x1f628)
      </pre>
      
    5. foundin initialized to: "8.7"
    6. is_private initialized to: "0"
    7. login: "chrstphrchvz"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "6133eb3026f9b10aa9b7b48da92ae2834fc225b0"
    10. resolution initialized to: "None"
    11. severity initialized to: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "chrstphrchvz"
    14. subsystem initialized to: "69. Other"
    15. title initialized to: "lseq.test triggers use-after-free on 32-bit"
    16. type initialized to: "Bug"
  2. Ticket change [602f81cebb] (rid 215906) by chrstphrchvz on 2023-06-25 20:17:21:

    1. login: "chrstphrchvz"
    2. mimetype: "text/x-fossil-wiki"
    3. subsystem changed to: "52. Portability Support"
    4. title changed to: "lseq-3.14 triggers use-after-free on 32-bit"
  3. Ticket change [dd91be0a05] (rid 215907) by griffin on 2023-06-25 21:40:18:

    1. assignee changed to: "griffin"
    2. login: "griffin"
    3. mimetype: "text/plain"
  4. Ticket change [491b671f56] (rid 215990) by chrstphrchvz on 2023-06-27 22:00:25:

    1. comment changed to:
      Occurs after tests are run. <s>Does not seem to occur on 64-bit.</s> Introduced by [97cc33cd20fd]. AddressSanitizer (<tt>-DPURIFY -fsanitize=address</tt>) output:
      
      <pre>
      ==11283==ERROR: AddressSanitizer: heap-use-after-free on address 0xad4221b4 at pc 0xb60e0de8 bp 0xbfd96a48 sp 0xbfd96a38
      READ of size 4 at 0xad4221b4 thread T0
          #0 0xb60e0de7 in Tcl_AppendObjToObj tcl87/generic/tclStringObj.c:1790
          #1 0xb618eaab in Tcl_GetVariableFullName tcl87/generic/tclVar.c:4975
          #2 0xb61923a3 in TclDeleteNamespaceVars tcl87/generic/tclVar.c:5472
          #3 0xb5fde359 in TclTeardownNamespace tcl87/generic/tclNamesp.c:1199
          #4 0xb56fe6c4 in DeleteInterpProc tcl87/generic/tclBasic.c:1913
          #5 0xb607f9f6 in Tcl_Release tcl87/generic/tclPreserve.c:228
          #6 0xb5fd68f3 in FreeMainInterp tcl87/generic/tclMain.c:923
          #7 0xb5d6b689 in InvokeExitHandlers tcl87/generic/tclEvent.c:936
          #8 0xb5d6b82d in Tcl_Finalize tcl87/generic/tclEvent.c:1208
          #9 0xb5d6b752 in Tcl_Exit tcl87/generic/tclEvent.c:993
          #10 0xb5793245 in Tcl_ExitObjCmd tcl87/generic/tclCmdAH.c:1145
          #11 0xb571b89b in Dispatch tcl87/generic/tclBasic.c:4996
          #12 0xb571bca1 in TclNRRunCallbacks tcl87/generic/tclBasic.c:5036
          #13 0xb572e044 in TclEvalObjEx tcl87/generic/tclBasic.c:6610
          #14 0xb572deeb in Tcl_EvalObjEx tcl87/generic/tclBasic.c:6591
          #15 0xb5fd4df0 in Tcl_MainEx tcl87/generic/tclMain.c:609
          #16 0x52b5f3 in main tcl87/unix/tclAppInit.c:94
          #17 0xb4e25628  (/usr/lib/libc.so.6+0x1f628)
          #18 0xb4e256ec in __libc_start_main (/usr/lib/libc.so.6+0x1f6ec)
          #19 0x52b3fa in _start (tcl87/unix/tcltest+0x483fa)
      
      0xad4221b4 is located 4 bytes inside of 24-byte region &#91;0xad4221b0,0xad4221c8)
      freed by thread T0 here:
          #0 0xb78c0f61 in __interceptor_free /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:52
          #1 0xb56be305 in TclpFree tcl87/generic/tclAlloc.c:722
          #2 0xb6007745 in TclFreeObj tcl87/generic/tclObj.c:1483
          #3 0xb61802da in ArrayForLoopCallback tcl87/generic/tclVar.c:3347
          #4 0xb571bca1 in TclNRRunCallbacks tcl87/generic/tclBasic.c:5036
          #5 0xb57185b2 in Tcl_EvalObjv tcl87/generic/tclBasic.c:4755
          #6 0xb5729408 in TclEvalEx tcl87/generic/tclBasic.c:5912
          #7 0xb5f6c446 in Tcl_FSEvalFileEx tcl87/generic/tclIOUtil.c:1782
          #8 0xb5fd2ec7 in Tcl_MainEx tcl87/generic/tclMain.c:405
          #9 0x52b5f3 in main tcl87/unix/tclAppInit.c:94
          #10 0xb4e25628  (/usr/lib/libc.so.6+0x1f628)
      
      previously allocated by thread T0 here:
          #0 0xb78c2315 in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:69
          #1 0xb56be2df in TclpAlloc tcl87/generic/tclAlloc.c:699
          #2 0xb5778714 in Tcl_Alloc tcl87/generic/tclCkalloc.c:1037
          #3 0xb601469a in Tcl_NewWideIntObj tcl87/generic/tclObj.c:3333
          #4 0xb56c2e6c in TclArithSeriesObjIndex tcl87/generic/tclArithSeries.c:451
          #5 0xb5fbca28 in SetListFromAny tcl87/generic/tclListObj.c:3273
          #6 0xb6006573 in Tcl_ConvertToType tcl87/generic/tclObj.c:986
          #7 0xb60092f6 in SetDuplicatePureObj tcl87/generic/tclObj.c:1652
          #8 0xb600a009 in TclDuplicatePureObj tcl87/generic/tclObj.c:1701
          #9 0xb617debc in ArrayForNRCmd tcl87/generic/tclVar.c:3224
          #10 0xb571b89b in Dispatch tcl87/generic/tclBasic.c:4996
          #11 0xb571bca1 in TclNRRunCallbacks tcl87/generic/tclBasic.c:5036
          #12 0xb57185b2 in Tcl_EvalObjv tcl87/generic/tclBasic.c:4755
          #13 0xb5729408 in TclEvalEx tcl87/generic/tclBasic.c:5912
          #14 0xb5f6c446 in Tcl_FSEvalFileEx tcl87/generic/tclIOUtil.c:1782
          #15 0xb5fd2ec7 in Tcl_MainEx tcl87/generic/tclMain.c:405
          #16 0x52b5f3 in main tcl87/unix/tclAppInit.c:94
          #17 0xb4e25628  (/usr/lib/libc.so.6+0x1f628)
      </pre>
      
    2. icomment:
      I have now observed this error on 64-bit; not sure why I did not observe it earlier. So the error is not specific to 32-bit.
      
      This is fixed by backporting [e45cee0c53]; the test <tt>lseq-convertToList</tt> would trigger a similar error immediately rather than when exiting. So this is a duplicate of [5ee010988248] but for 8.7.
      
    3. login: "chrstphrchvz"
    4. mimetype: "text/x-fossil-wiki"
    5. title changed to: "lseq-3.14 triggers use-after-free"
  5. Ticket change [9982911209] (rid 216087) by griffin on 2023-06-30 14:21:39:

    1. closedate changed to: "2460126.09837205"
    2. closer changed to: "griffin"
    3. icomment:
      Fixed with [68c0bd3f02]
      Thanks Jan!
      
    4. login: "griffin"
    5. mimetype: "text/x-markdown"
    6. status changed to: "Closed"