Details
- Reviewers
stephan.yichao.zhao
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
compiler-rt/lib/dfsan/done_abilist.txt | ||
---|---|---|
76 | Is this discard? https://man7.org/linux/man-pages/man3/isatty.3.html
This sounds like the return value has no direct dependency on fd. | |
159 | This one probably needs a custom wrapper. Here is an mac os implementation. fp->_file = fd; So we need to propagate fd's label to fp's _file field. It would be great to find a linux implementation to confirm this. | |
163 | From this uncommon implementation, the return value may depend on the contents the input pointer refers to. Other APIs in this change may have similar dependency. I suggest we could check their implementation a bit more. |
compiler-rt/lib/dfsan/done_abilist.txt | ||
---|---|---|
76 | isatty(3) is a library function and is usually implemented by calling tcgetattr(3) and checking its return value. Not sure if there might be a direct dependency, because it depends on tcgetattr's implementation. In any case, I wouldn't think file descriptors will have non-zero labels in practice so it probably doesn't make a lot of difference. I could still change it to discard, if you want. | |
159 | Yeah, this is the one I was most unsure about. However, FILE* is an opaque struct. Do you think a custom wrapper that simply copied the file descriptor argument's label to the return label would suffice? | |
163 | I think marking this discard is consistent with other wrappers. E.g., if you look at __dfsw_fgets (or other IO-related functions) it doesn't do anything with its stream_label nor does it propagate it to its output. Since fgetc has only a single stream argument, its implementation would basically just zero out the return label which iiuc is equivalent to marking it discard. |
Is this discard?
https://man7.org/linux/man-pages/man3/isatty.3.html
This sounds like the return value has no direct dependency on fd.