<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/mariadb-git.git/mysql-test/include/not_valgrind_build.inc, branch 11.1</title>
<subtitle>github.com: MariaDB/server.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/mariadb-git.git/'/>
<entry>
<title>Added detection of memory overwrite with multi_malloc</title>
<updated>2023-02-27T17:25:44+00:00</updated>
<author>
<name>Monty</name>
<email>monty@mariadb.org</email>
</author>
<published>2023-02-26T16:33:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/mariadb-git.git/commit/?id=57c526ffb852fb027e25fdc77173d45bdc60b8a2'/>
<id>57c526ffb852fb027e25fdc77173d45bdc60b8a2</id>
<content type='text'>
This patch also fixes some bugs detected by valgrind after this
patch:

- Not enough copy_func elements was allocated by Create_tmp_table() which
  causes an memory overwrite in Create_tmp_table::add_fields()
  I added an ASSERT() to be able to detect this also without valgrind.
  The bug was that TMP_TABLE_PARAM::copy_fields was not correctly set
  when calling create_tmp_table().
- Aria::empty_bits is not allocated if there is no varchar/char/blob
  fields in the table.  Fixed code to take this into account.
  This cannot cause any issues as this is just a memory access
  into other Aria memory and the content of the memory would not be used.
- Aria::last_key_buff was not allocated big enough. This may have caused
  issues with rtrees and ma_extra(HA_EXTRA_REMEMBER_POS) as they
  would use the same memory area.
- Aria and MyISAM didn't take extended key parts into account, which
  caused problems when copying rec_per_key from engine to sql level.
- Mark asan builds with 'asan' in version strihng to detect these in
  not_valgrind_build.inc.
  This is needed to not have main.sp-no-valgrind fail with asan.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch also fixes some bugs detected by valgrind after this
patch:

- Not enough copy_func elements was allocated by Create_tmp_table() which
  causes an memory overwrite in Create_tmp_table::add_fields()
  I added an ASSERT() to be able to detect this also without valgrind.
  The bug was that TMP_TABLE_PARAM::copy_fields was not correctly set
  when calling create_tmp_table().
- Aria::empty_bits is not allocated if there is no varchar/char/blob
  fields in the table.  Fixed code to take this into account.
  This cannot cause any issues as this is just a memory access
  into other Aria memory and the content of the memory would not be used.
- Aria::last_key_buff was not allocated big enough. This may have caused
  issues with rtrees and ma_extra(HA_EXTRA_REMEMBER_POS) as they
  would use the same memory area.
- Aria and MyISAM didn't take extended key parts into account, which
  caused problems when copying rec_per_key from engine to sql level.
- Mark asan builds with 'asan' in version strihng to detect these in
  not_valgrind_build.inc.
  This is needed to not have main.sp-no-valgrind fail with asan.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed some tests that failes when built with valgrind</title>
<updated>2021-12-15T21:29:04+00:00</updated>
<author>
<name>Monty</name>
<email>monty@mariadb.org</email>
</author>
<published>2021-12-15T21:29:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/mariadb-git.git/commit/?id=20f22dfa2f2d5bb5a1511d42a5bb18fbf469e812'/>
<id>20f22dfa2f2d5bb5a1511d42a5bb18fbf469e812</id>
<content type='text'>
Example build: ./BUILD/compile-pentium64-valgrind-max

Fixes:
- sp-no-valgrind failed if binary was built for valgrind as in this case
  mem_root is allocated in very small hunks which the test cannot handle.
  Fixed by testing of valgrind build
- truncate_notembedded failed in reap because of more memory used.
  Fixed by allowing reap to fail too
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Example build: ./BUILD/compile-pentium64-valgrind-max

Fixes:
- sp-no-valgrind failed if binary was built for valgrind as in this case
  mem_root is allocated in very small hunks which the test cannot handle.
  Fixed by testing of valgrind build
- truncate_notembedded failed in reap because of more memory used.
  Fixed by allowing reap to fail too
</pre>
</div>
</content>
</entry>
</feed>
