Ticket Change Details
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to
or submit via the online form by Sep 9.

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

  1. Change foundin to "latest"
  2. Change icomment to:

    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/ #2 0x00007fffe2af3366 in ConnectionConstructor () from /opt/BAWT/Tcl/lib/tdbcmysql1.0.5/ #3 0x00007ffff7b6bb1b in TclOO_Class_Create () from /home/tcl/bawt/BawtBuild/Linux/x64/Release/Install/Tcl/lib/ #4 0x00007ffff7b69f83 in TclOOObjectCmdCore () from /home/tcl/bawt/BawtBuild/Linux/x64/Release/Install/Tcl/lib/ #5 0x00007ffff7a63087 in TclNRRunCallbacks () from /home/tcl/bawt/BawtBuild/Linux/x64/Release/Install/Tcl/lib/ #6 0x00007ffff7a64f29 in TclEvalEx () from /home/tcl/bawt/BawtBuild/Linux/x64/Release/Install/Tcl/lib/ #7 0x00007ffff7b2cc69 in TclSubstTokens () from /home/tcl/bawt/BawtBuild/Linux/x64/Release/Install/Tcl/lib/ #8 0x00007ffff7a64d73 in TclEvalEx () from /home/tcl/bawt/BawtBuild/Linux/x64/Release/Install/Tcl/lib/ #9 0x00007ffff7b19cd2 in Tcl_FSEvalFileEx () from /home/tcl/bawt/BawtBuild/Linux/x64/Release/Install/Tcl/lib/ #10 0x00007ffff7b21187 in Tcl_MainEx () from /home/tcl/bawt/BawtBuild/Linux/x64/Release/Install/Tcl/lib/ #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/

  3. Change login to "anonymous"
  4. Change mimetype to "text/x-fossil-plain"
  5. Change private_contact to "9dffd9dca08d8cf29375b31fd4546e721bbedab8"
  6. Change severity to "Critical"
  7. Change status to "Open"
  8. Change title to "tdbc::mysql crashes tcl"
  9. Change type to "Code_Defect"