You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.
Currently Keyedge can deal with single-layered const quantifiers, say const char*. However I do not think it can handle a complex quantifier nightmare until we find out how LibClang and C++ standard deal with all the quantifier-nesting. Given that it occurs sufficiently infrequently in libraries, and there is actually a memory leak issue below, it might be worthwhile to just port these functions by hand when it shows up.
The memory leak thing is like this: say you have a function like foo(const char* str), you cannot free the memory str occupies due to the nature that it is const-quantified. Therefore, if the edge wrapper does not free it, it is leaked unless you const-cast it. In the current implementation the wrapper frees every const variable it comes across with, so that they do not become leaked. However, this also means that whatever pointer pointing to them also becomes invalidated, which sounds to me like a bug more than a feature. We need to revise on how that works.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently Keyedge can deal with single-layered const quantifiers, say
const char*
. However I do not think it can handle a complex quantifier nightmare until we find out how LibClang and C++ standard deal with all the quantifier-nesting. Given that it occurs sufficiently infrequently in libraries, and there is actually a memory leak issue below, it might be worthwhile to just port these functions by hand when it shows up.The memory leak thing is like this: say you have a function like
foo(const char* str)
, you cannot free the memorystr
occupies due to the nature that it is const-quantified. Therefore, if the edge wrapper does not free it, it is leaked unless you const-cast it. In the current implementation the wrapper frees everyconst
variable it comes across with, so that they do not become leaked. However, this also means that whatever pointer pointing to them also becomes invalidated, which sounds to me like a bug more than a feature. We need to revise on how that works.The text was updated successfully, but these errors were encountered: