Closed jecastro1 closed 10 months ago
Interesting. I can also repro on macOS, but it's fine on Windows. Here was my program:
require 'tiny_tds'
puts "TinyTds::VERSION #{TinyTds::VERSION}"
puts "RUBY_VERSION #{RUBY_VERSION}"
c = TinyTds::Client.new username: 'sa', password: 'Testing123@@', host: 'localhost', database: 'master', login_timeout: 2
c.close
puts c.closed?.inspect
puts c.dead?.inspect
Here's the code that implements dead?
:
Things to investigate:
cwrap
and cwrap->client
exist at this point or is there a null pointer (etc) sneaking in here somehow?dbdead
is from FreeTDS, what is it doing? (link)I think we could close this Issue after having merged #527 😬
The fix submitted by @matias-martini has been released with 2.1.6.
Hi! First I'd like to thank you for developing this gem
Environment
Operating System
ProductName: macOS ProductVersion: 12.5 BuildVersion: 21G72
TinyTDS Version and Information
2.1.5 (also happens with 2.1.3)
FreeTDS Version
Description
There's a segmentation fault when one calls
dead?
after closing the client.Expected behaviour I'd expect the method to just return
true
. Even an exception would be acceptable if you think this case is a misuse of the client.Repro