-
Notifications
You must be signed in to change notification settings - Fork 439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about modeling of system api like getpwuid #1610
Comments
Currently, I made a modification that makes char* globalData = "dummy global\n";
#define STATIC_OBJECT globalData |
We added a new " |
@for-just-we could you try our patch and let us know if it works before we merge it to upstream? |
It seems worked, no false positive leak report for these API source points. |
Thanks for reporting back. |
I notice in svf-llvm/lib/extapi.c, the api like
getpwuid
returnSTATIC_OBJECT
. However, theSTATIC_OBJECT
is defined asmalloc(10)
, which causes many false positive bug report in real-world projects like nginx.Would it make more sense to define it as
alloca(10)
orNULL
, sincealloca
andNULL
do not need to be freed. Which may not be reasonable but could reduce false reports of heap object. Or consider modeling it to point to a global object.Here is an example:
The bug report is as follows, which seems to be false positives.
The text was updated successfully, but these errors were encountered: