GithubHelp home page GithubHelp logo

Comments (6)

Koka avatar Koka commented on August 27, 2024

@bbigras It's very strange. I've finally setup dockerized version of MSSQL for Linux on my Mac and I've run your code for 100 times (with latest odbc-rs 0.9.0) in a loop and everything is fine, no errors, 10605 is returned every time

from odbc-rs.

pacman82 avatar pacman82 commented on August 27, 2024

Sounds like we messed up in our unsafe code. A backtrace would be helpful.

from odbc-rs.

bbigras avatar bbigras commented on August 27, 2024
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: State: HY090, Native error: 0, Message: [FreeTDS][SQL Server]Invalid string or buffer length', /checkout/src/libcore/result.rs:860:4
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
             at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at /checkout/src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at /checkout/src/libstd/sys_common/backtrace.rs:60
             at /checkout/src/libstd/panicking.rs:380
   3: std::panicking::default_hook
             at /checkout/src/libstd/panicking.rs:396
   4: std::panicking::rust_panic_with_hook
             at /checkout/src/libstd/panicking.rs:610
   5: std::panicking::begin_panic
             at /checkout/src/libstd/panicking.rs:571
   6: std::panicking::begin_panic_fmt
             at /checkout/src/libstd/panicking.rs:521
   7: rust_begin_unwind
             at /checkout/src/libstd/panicking.rs:497
   8: core::panicking::panic_fmt
             at /checkout/src/libcore/panicking.rs:71
   9: core::result::unwrap_failed
             at /checkout/src/libcore/macros.rs:31
  10: <core::result::Result<T, E>>::unwrap
             at /checkout/src/libcore/result.rs:738
  11: test_odbc::main
             at src/main.rs:292
  12: __rust_maybe_catch_panic
             at /checkout/src/libpanic_unwind/lib.rs:98
  13: std::rt::lang_start
             at /checkout/src/libstd/panicking.rs:458
             at /checkout/src/libstd/panic.rs:361
             at /checkout/src/libstd/rt.rs:61
  14: main
  15: __libc_start_main
  16: _start

from odbc-rs.

bbigras avatar bbigras commented on August 27, 2024

Any progress on this?

from odbc-rs.

Koka avatar Koka commented on August 27, 2024

@bbigras I'm afraid not much as I've had almost no free time in last few month to check this further.

from odbc-rs.

Koka avatar Koka commented on August 27, 2024

Note to myself: looks like bind param is broken at

len_buf_ptr.as_mut_ptr() as *mut ffi::SQLLEN, // str len or ind ptr
- odbc spec states that this buffer must be alive at the time of statement execution, and for now it's not true. Looks like awful use-after-free bug :(

from odbc-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.