tdbc::mysql

Ticket Change Details
Login
Overview

Artifact ID: 415c4827e6562d90415d072d1c2a423d612aa26e624c2d573b59f38b4e996ac0
Ticket: 040c635cb3fb898bef4ec87c60c9d09a64c504c6
tdbc::mysql crashes tcl
User & Date: anonymous 2018-10-08 17:19:05
Changes

  1. foundin changed to: "latest"
  2. icomment:
    Hi all,
    
    It seems that tdbc::mysql tries to dynamically load the MySql client library, but no check is made if it has been actually loaded. This trivially leads to the following crash, when using the package:
    
    #0  0x0000000000000000 in ?? ()
    #1  0x00007fffe2af30bc in ConfigureConnection ()
       from /opt/BAWT/Tcl/lib/tdbcmysql1.0.5/libtdbcmysql1.0.5.so
    #2  0x00007fffe2af3366 in ConnectionConstructor ()
       from /opt/BAWT/Tcl/lib/tdbcmysql1.0.5/libtdbcmysql1.0.5.so
    #3  0x00007ffff7b6bb1b in TclOO_Class_Create ()
       from /home/tcl/bawt/BawtBuild/Linux/x64/Release/Install/Tcl/lib/libtcl8.7.so
    #4  0x00007ffff7b69f83 in TclOOObjectCmdCore ()
       from /home/tcl/bawt/BawtBuild/Linux/x64/Release/Install/Tcl/lib/libtcl8.7.so
    #5  0x00007ffff7a63087 in TclNRRunCallbacks ()
       from /home/tcl/bawt/BawtBuild/Linux/x64/Release/Install/Tcl/lib/libtcl8.7.so
    #6  0x00007ffff7a64f29 in TclEvalEx ()
       from /home/tcl/bawt/BawtBuild/Linux/x64/Release/Install/Tcl/lib/libtcl8.7.so
    #7  0x00007ffff7b2cc69 in TclSubstTokens ()
       from /home/tcl/bawt/BawtBuild/Linux/x64/Release/Install/Tcl/lib/libtcl8.7.so
    #8  0x00007ffff7a64d73 in TclEvalEx ()
       from /home/tcl/bawt/BawtBuild/Linux/x64/Release/Install/Tcl/lib/libtcl8.7.so
    #9  0x00007ffff7b19cd2 in Tcl_FSEvalFileEx ()
       from /home/tcl/bawt/BawtBuild/Linux/x64/Release/Install/Tcl/lib/libtcl8.7.so
    #10 0x00007ffff7b21187 in Tcl_MainEx ()
       from /home/tcl/bawt/BawtBuild/Linux/x64/Release/Install/Tcl/lib/libtcl8.7.so
    #11 0x0000000000400784 in main ()
    
    Somewhere in ConfigureConnection(), a NULL pointer is called, without checking if it NULL.
    
    And this is very easy to happen, just run tdbc::mysql on any Fedora distribution (that uses MariaDB by default, and the client is named /usr/lib64/libmariadb.so.3).
    
  3. login: "anonymous"
  4. mimetype: "text/x-fossil-plain"
  5. private_contact changed to: "9dffd9dca08d8cf29375b31fd4546e721bbedab8"
  6. severity changed to: "Critical"
  7. status changed to: "Open"
  8. title changed to: "tdbc::mysql crashes tcl"
  9. type changed to: "Code_Defect"