[DynInst_API:] COMMIT: common: rewrite caching in Linux P_cplus_demangle()


Date: Fri, 31 Jul 2015 18:19:05 -0700
From: Josh Stone <jistone@xxxxxxxxxx>
Subject: [DynInst_API:] COMMIT: common: rewrite caching in Linux P_cplus_demangle()
This patch is now on master.

On 07/30/2015 03:28 PM, Josh Stone wrote:
> This had a bug where a last_typed value was saved even for parameter
> includeTypes==false, where cplus_demangle opts lacked DMGL_PARAMS.
> Similarly, the nativeCompiler parameter wasn't considered at all for
> caching.
> 
> This caused strange issues in boost::multi_index, where its internal
> rehashing was sometimes allocating buffers incorrectly for its buckets.
> This was because Symbol->getTypedName() was returning different values
> depending on how P_cplus_demangle was cached, and silently changing keys
> in a map is no good at all.
> 
> P_cplus_demangle caching now requires an exact match on all three input
> parameters before returning the saved result.

[← Prev in Thread] Current Thread [Next in Thread→]