Commit 4fa8dd1
Ajo Robert
Bug#35395965 heap-use-after-free with functions, procedure
and Item_func_in::populate_bisection As part of a performance improvement, m_const_array is introduced to save IN list items across execution. This list is populated either at the end of preparation or at the start of execution based on the nature of its objects. Some of its elements (String class object) have memory allocated from runtime memory (example: input constants) that are not valid after the end of the current execution. Ownership of such memory is not passed to the String object at the assignment. But reuse is attempted in subsequent runs that can lead to unexpected behavior. Fix: Release all runtime memory and cleanup pointers in m_const_array at the end of statement execution. Change-Id: Ib56b047c54b1b0d9428e9ed515e097ab4e0d5e4d1 parent fc524be commit 4fa8dd1
2 files changed
+21
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4375 | 4375 | | |
4376 | 4376 | | |
4377 | 4377 | | |
| 4378 | + | |
| 4379 | + | |
| 4380 | + | |
| 4381 | + | |
| 4382 | + | |
| 4383 | + | |
| 4384 | + | |
| 4385 | + | |
4378 | 4386 | | |
4379 | 4387 | | |
4380 | 4388 | | |
4381 | | - | |
4382 | | - | |
4383 | | - | |
4384 | | - | |
4385 | | - | |
4386 | | - | |
4387 | | - | |
4388 | | - | |
4389 | | - | |
4390 | | - | |
4391 | | - | |
4392 | | - | |
4393 | | - | |
| 4389 | + | |
| 4390 | + | |
| 4391 | + | |
| 4392 | + | |
| 4393 | + | |
| 4394 | + | |
| 4395 | + | |
4394 | 4396 | | |
4395 | 4397 | | |
4396 | 4398 | | |
| |||
5371 | 5373 | | |
5372 | 5374 | | |
5373 | 5375 | | |
5374 | | - | |
| 5376 | + | |
| 5377 | + | |
| 5378 | + | |
| 5379 | + | |
5375 | 5380 | | |
5376 | 5381 | | |
5377 | 5382 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1629 | 1629 | | |
1630 | 1630 | | |
1631 | 1631 | | |
| 1632 | + | |
1632 | 1633 | | |
1633 | 1634 | | |
1634 | 1635 | | |
| |||
1655 | 1656 | | |
1656 | 1657 | | |
1657 | 1658 | | |
| 1659 | + | |
1658 | 1660 | | |
1659 | 1661 | | |
1660 | 1662 | | |
| |||
0 commit comments