32bit Drizzle coredumps in vfprintf during startup on Solaris

Bug #441106 reported by Trond Norbye
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
High
Trond Norbye

Bug Description

  [1] memchr(0xfe6405f4, 0x0, 0x0, 0x30), at 0xfe5f3e6c
  [2] _ndoprnt(0x88007a7), at 0xfe6405f4
  [3] vfprintf(0x890b3a8, 0x88007a7, 0x8046810), at 0xfe642fbf
=>[4] drizzled::plugin::ErrorMessage::vprintf(session = 0x8972008, priority = 3, format = 0x88007a7 "%s: Forcing close of thread %ld user: '%-.48s'\n", ap = 0x8046810), line 99 in "error_message.cc"
  [5] errmsg_printf(priority = 3, format = 0x88007a7 "%s: Forcing close of thread %ld user: '%-.48s'\n", ...), line 47 in "errmsg_print.cc"
  [6] Session::~Session(this = 0x8972008), line 394 in "session.cc"
  [7] __SLIP.DELETER__F(0x8972008, 0x1), at 0x84b43de
  [8] drizzle_rm_tmp_tables(), line 4597 in "sql_base.cc"
  [9] main(argc = 18, argv = 0x8046fc4), line 1549 in "drizzled.cc"

Changed in drizzle:
assignee: nobody → Trond Norbye (trond-norbye)
Revision history for this message
Lee Bieber (kalebral-deactivatedaccount) wrote :
Changed in drizzle:
importance: Undecided → High
status: New → Confirmed
milestone: none → bell
Revision history for this message
Trond Norbye (trond-norbye) wrote :

This is caused because we call vfprintf with the following string "%s: Forcing close of thread %ld user: '%-.48s'\n", and the arguments to vfprintf doesn't match the specified format.

If you look closely you will see that we specify "%ld" for the thread id, but we pass a 64bit datatype, and on the 32 bit platform that results in that the second 32 bit value is used as the pointer to %-.48s.

Instead the format string should specify %lld for the thread id.

Changed in drizzle:
status: Confirmed → Fix Committed
Changed in drizzle:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.