-
Notifications
You must be signed in to change notification settings - Fork 440
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
Remove "STATIC" annotation in extapi.bc #1188
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #1188 +/- ##
==========================================
+ Coverage 64.64% 64.66% +0.01%
==========================================
Files 222 222
Lines 23525 23509 -16
==========================================
- Hits 15207 15201 -6
+ Misses 8318 8308 -10
|
svf-llvm/lib/extapi.c
Outdated
const unsigned short **__ctype_b_loc(void) | ||
{ | ||
return NULL; | ||
return malloc(10); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why malloc(10)? better to have a macro rather than a concrete number.
If you remove all STATIC functions, how about static functions mentioned here:
#1186
… that its return value points to
…hout annotations in extapi.c
svf-llvm/lib/extapi.c
Outdated
|
||
void *fdopen(int fd, const char *mode) | ||
{ | ||
return STATIC_OBJECT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I know, fdopen will (just like fopen & family) return a new object every time it's called, unless it's called with the same fd. Should this be ALLOC_RET instead? The behavior should probably be consistent with fopen
at least, which is currently ALLOC_RET.
Looks good to me. To be clear: this resolves the issue of contradicting ALLOC_RET and STATIC annotations, but as far as I understand, we would still need a change to the format to support some of the more complex extapi behavior discussed in #1186, is that correct? Regardless, this looks good. The |
* Remove "STATIC" annotation in extapi.bc * Return "STATIC_OBJECT" in an external function which has a static var that its return value points to * Move the functions with annotations to the front of the functions without annotations in extapi.c * annotate fdopen() with "ALLOC_RET"
* fix vfspta read&write * fix * fix a nullptr dereference when creating AndersenSCD singleton instance * Fix the bug of failing to find extapi.bc in npm * Chang function names in ExtAPI * SVF code formatter * Add comments to some APIs in SVFIRExtAPI.cpp * SVF code formatter * fix getgepoffset and accumulateconstantOffset support byte size * refactor gepoffset api and accumulateOffset api 1. add getBytefromGepTypePair in SvfIR2ItvExeState 2. add getIndexfromGepTypePair in SvfIR2ItvExeState 3. add accumulateConstantByteOffset in AccessPath * add comment to getGepByteOffset and accumulateConstantByteOffset * SVF code formatter * Remove "STATIC" annotation in extapi.bc (#1188) * Remove "STATIC" annotation in extapi.bc * Return "STATIC_OBJECT" in an external function which has a static var that its return value points to * Move the functions with annotations to the front of the functions without annotations in extapi.c * annotate fdopen() with "ALLOC_RET" * fix a bug that leads to get many incorrect switch target case value -1 (#1191) * fix a bug that leads to get many incorrect switch target value -1 * complete SVFIRBuilder about SwitchInst and make it easy understandable: get case successor basic block and related case value. * add reshapeValue() to getOffsetfromGepPair (#1192) * add reshapeValue() to getOffsetfromGepPair * refactor getGepByteOffset and accumulateConstantByteOffset * fix SVF CI compile err --------- Co-authored-by: jiawei.wang <[email protected]> * SVF code formatter * replace int64 with s64 in IntervalValue/Z3Expr (#1195) * add reshapeValue() to getOffsetfromGepPair * refactor getGepByteOffset and accumulateConstantByteOffset * fix SVF CI compile err * replace int64 with s64 to IntervalValue * replace more int64 with s64 * replace more int64 with s64 * replace more int64 with s64 * replace more int64 with s64 * replace more int64 with s64 * replace more int64 with s64 --------- Co-authored-by: jiawei.wang <[email protected]> * SVF code formatter update code update changes update upate --------- Co-authored-by: JasonZhongZexin <[email protected]> Co-authored-by: canliture <[email protected]> Co-authored-by: shuangxiang kan <[email protected]> Co-authored-by: GitHub Actions Build <[email protected]> Co-authored-by: jiawei.wang <[email protected]> Co-authored-by: shuangxiang kan <[email protected]> Co-authored-by: Jiawei Wang <[email protected]>
No description provided.