*** glibc detected *** bin/drizzle: munmap_chunk(): invalid pointer: 0x00007f55437015a0 ***

Bug #549914 reported by Andrew Hutchings
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
High
ziminq
Cherry
Fix Released
High
ziminq

Bug Description

drizzle> SELECT UNIX_TIMESTAMP('2126-11-30 10:30:19');
ERROR 1685 (HY000): Received an invalid value '2126-11-30 10:30:19' for a UNIX timestamp.
drizzle> quit
*** glibc detected *** bin/drizzle: munmap_chunk(): invalid pointer: 0x00007f55437015a0 ***
======= Backtrace: =========
/lib/libc.so.6(+0x775b6)[0x7f55421b65b6]
/home/linuxjedi/Programming/Builds/libdrizzle//lib/libdrizzle.so.0(drizzle_result_free+0x3a)[0x7f55432d95ba]
/home/linuxjedi/Programming/Builds/libdrizzle//lib/libdrizzle.so.0(drizzle_result_free_all+0x15)[0x7f55432d9685]
/home/linuxjedi/Programming/Builds/libdrizzle//lib/libdrizzle.so.0(drizzle_con_free+0xe8)[0x7f55432d4778]
bin/drizzle[0x40a839]
bin/drizzle[0x410c3e]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7f554215dc4d]
bin/drizzle[0x407889]

Related branches

Changed in drizzle:
assignee: nobody → DeD (dedzone)
Revision history for this message
Djellel E. Difallah (dedzone) wrote :

This is probably related to the bug I've just registred. It seems that all time functions have the same behaviour

Revision history for this message
ziminq (ziminq) wrote :

Hi Ded,

I've got a fix, but due to the firewall in my school right now, I can't push it to lp, I'll do it later.
generally speaking, it's because it lacks one drizzle_result_free().
I'm thinking we can register another blueprint which check such failure and cleans up all the error path.

committer: Zimin <email address hidden>
branch nick: fix-bug549914
timestamp: Mon 2010-03-29 11:48:36 +0800
message:
  fix bug549914: add one line of drizzle_result_free() on the error path.
diff:
=== modified file 'client/drizzle.cc'
--- client/drizzle.cc 2010-03-26 07:04:37 +0000
+++ client/drizzle.cc 2010-03-29 03:48:36 +0000
@@ -2618,8 +2618,11 @@
   if (drizzle_result_buffer(result) == DRIZZLE_RETURN_OK)
     return 0;

- if (drizzle_con_error(&con)[0])
- return put_error(&con, result);
+ if (drizzle_con_error(&con)[0]) {
+ int ret = put_error(&con, result);
+ drizzle_result_free(result);
+ return ret;
+ }
   return 0;
 }

Revision history for this message
ziminq (ziminq) wrote :

sorry for the noise, mis-click ...

Changed in drizzle:
assignee: DeD (dedzone) → ziminq (ziminq)
assignee: ziminq (ziminq) → DeD (dedzone)
Revision history for this message
Djellel E. Difallah (dedzone) wrote :

great that fixes the other one too I'll link it!

Changed in drizzle:
assignee: DeD (dedzone) → ziminq (ziminq)
Changed in drizzle:
milestone: none → 2010-04-12
status: New → Confirmed
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.