<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Code obfuscation results in memory leaks reported by Valgrind, AddressSanitizer"
href="https://bugs.freedesktop.org/show_bug.cgi?id=96535">96535</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Code obfuscation results in memory leaks reported by Valgrind, AddressSanitizer
</td>
</tr>
<tr>
<th>Product</th>
<td>fontconfig
</td>
</tr>
<tr>
<th>Version</th>
<td>2.11
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>library
</td>
</tr>
<tr>
<th>Assignee</th>
<td>fontconfig-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>zboszor@pr.hu
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>freedesktop@behdad.org
</td>
</tr></table>
<p>
<div>
<pre>Fontconfig uses pointer arithmetics to compute the distance from an object base
pointer to a member structure and the result is stored in intptr_t type
members.
This causes reported memory leaks in fontconfig in applications compiled with
GCC's AddressSanitizer and Valgrind, too.
The fact that the size of intptr_t always equals to the size of a pointer makes
this whole thing look like code obfuscation.
It also slows down the code slightly. Pointer arithmetics and storing the
result is always slower than just storing the pointer value.
The amount of reported memory leaks in AddressSanitizer is so much that it
makes genuine debugging hard, like searching for a needle in a haystack.
Please, use real pointers instead of intptr_t.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>