#At file:///usr/home/serg/Abk/mysql/6.0-var/ based on revid:serg@stripped
2905 Sergei Golubchik 2009-11-13
Bug#48758 mysqltest crashes on sys_vars.collation_server_basic in gcov builds
we have to keep all environment entires valid on exit
modified:
client/mysqltest.cc
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc 2009-08-31 17:24:00 +0000
+++ b/client/mysqltest.cc 2009-11-13 12:23:02 +0000
@@ -1946,7 +1946,14 @@ VAR *var_init(VAR *v, const char *name,
void var_free(void *v)
{
my_free(((VAR*) v)->str_val, MYF(MY_WME));
+#ifndef HAVE_gcov
+ /*
+ this can turn entries in the environment into garbage,
+ and make subsequent getenv/putenv to crash, but gcov
+ calls getenv() from the exit handler.
+ */
my_free(((VAR*) v)->env_s, MYF(MY_WME|MY_ALLOW_ZERO_PTR));
+#endif
if (((VAR*)v)->alloced)
my_free(v, MYF(MY_WME));
}
Attachment: [text/bzr-bundle] bzr/serg@mysql.com-20091113122302-ycpw6ihc81td3nwz.bundle
| Thread |
|---|
| • bzr commit into mysql-5.4 branch (serg:2905) Bug#48758 | Sergei Golubchik | 13 Nov |