Re: [GSoC][Static Analyzer] First proposal draft and a few more questions/requests

2023-04-02 Thread Shengyu Huang via Gcc
Hi Dave, > Overall, it looks great. Some notes: > - maybe specify the *GCC* static analyzer you first mention it Done. > - you talk about "timeout" warnings. The analyzer already can emit a > "timeout" warning of sorts, via -Wanalyzer-too-complex, though this is > based on the complexity of th

Re: [GSoC][Static Analyzer] First proposal draft and a few more questions/requests

2023-04-01 Thread Shengyu Huang via Gcc
Hi Dave, >> >> I has looked into compiling those files with the patch some time ago; >> looking at my notes, one issue was with this on-stack buffer: >>char extra[1024]; >> declared outside the loop. Inside the loop, it gets modified in >> various ways: >>extra[0] = '\0'; >> and >>if

Re: [GSoC][Static Analyzer] First proposal draft and a few more questions/requests

2023-03-26 Thread Shengyu Huang via Gcc
Hi Dave, > On 26 Mar 2023, at 19:14, David Malcolm wrote: > > I has looked into compiling those files with the patch some time ago; > looking at my notes, one issue was with this on-stack buffer: >char extra[1024]; > declared outside the loop. Inside the loop, it gets modified in > various

Re: [GSoC][Static Analyzer] First proposal draft and a few more questions/requests

2023-03-26 Thread Shengyu Huang via Gcc
Hi Dave, (I forgot to cc the list in the last email and it was too late to unsend. Sorry for sending you the same email again.) > On 20 Mar 2023, at 23:50, David Malcolm > wrote: > > I think if you try the patch to sm.cc above, then you'll see > vari

Re: [Static Analyzer] Loop handling - False positive for malloc-sm

2023-03-21 Thread Shengyu Huang via Gcc
Hi Dave, > On 21 Mar 2023, at 00:30, David Malcolm via Gcc wrote: > > I implemented my own approach, with a "widening_svalue" subclass of > symbolic value. This is widening in the Abstract Interpretation sense, > (as opposed to the bitwise operations sense): if I see multiple values > on succes

Re: [Static Analyzer] Loop handling - False positive for malloc-sm

2023-03-21 Thread Shengyu Huang via Gcc
Hi Dave, > I implemented my own approach, with a "widening_svalue" subclass of > symbolic value. This is widening in the Abstract Interpretation sense, > (as opposed to the bitwise operations sense): if I see multiple values > on successive iterations, the widening_svalue tries to simulate that w

[GSoC][Static Analyzer] First proposal draft and a few more questions/requests

2023-03-20 Thread Shengyu Huang via Gcc
Hi Dave, Thanks for always getting back to me so promptly! I am drafting the proposal today. Here is the link: https://docs.google.com/document/d/1MRI1R5DaX8kM6DaqRQsEri5Mx2FvHmWv13qe1W0Bj0g/ (The proposal was first written in markdown and then copied pasted to Google Docs, so some formatting

Re: [GSoC][Static Analyzer] Ideas for proposal

2023-03-12 Thread Shengyu Huang via Gcc
Hi Dave, >> >> 4. What’s the most interesting to me are PR103533 >> (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103533), > > Turning on taint detection by default would be a great project. It > would be good to run the integration tests: > https://github.com/davidmalcolm/gcc-analyzer-integra

Re: [GSoC][Static Analyzer] Some questions and request for a small patch to work on

2023-03-01 Thread Shengyu Huang via Gcc
Hi Dave, > On 1 Mar 2023, at 00:59, David Malcolm wrote: > > Did you get it to output your messages? > Yes, I chose to emit the warning before the supergraph or exploded graph is created (I guess this is enough, right?). I checked out from the trunk a week ago, and I checked out from the la

Re: [GSoC][Static Analyzer] Ideas for proposal

2023-02-28 Thread Shengyu Huang via Gcc
Hi Dave, > On 22 Feb 2023, at 15:11, Shengyu Huang wrote: > >> But a better place to look would probably be in our bugzilla; see the >> links on the wiki page: >> https://gcc.gnu.org/wiki/StaticAnalyzer >> The "open bugs" list currently has 41 "RFE" bugs ("request for >> enhancement" i.e. idea

Re: [GSoC][Static Analyzer] Some questions and request for a small patch to work on

2023-02-28 Thread Shengyu Huang via Gcc
Hi Dave, Do you want me to follow the steps 7-10 (https://gcc-newbies-guide.readthedocs.io/en/latest/how-to-improve-the-location-of-a-diagnostic.html) or tell you where I add the code simply? Basically, I added warning_at (DECL_SOURCE_LOCATION (node->decl), 0, "hello world, I’m compiling %qE",

Re: [GSoC][Static Analyzer] Some questions and request for a small patch to work on

2023-02-27 Thread Shengyu Huang via Gcc
Hi Iain, > On 27 Feb 2023, at 14:45, Iain Sandoe wrote: > > Please file an issue against the branch on github (since this is a > development branch it’s not appropriate to use the GCC bugzilla yet). The same error occurred for both the development branch and the gcc-12-2 branch. Should I only

Re: [GSoC][Static Analyzer] Some questions and request for a small patch to work on

2023-02-27 Thread Shengyu Huang via Gcc
Hi Iain, Sorry for the late reply. I just built gcc-12-2 on my machine with bootstrap and it worked. However, maybe due to some missing configuration, building without bootstrap does not work on my machine (development branch or gcc-12-2). Specifically, my configuration is as follows. ``` $HO

Re: [GSoC][Static Analyzer] Some questions and request for a small patch to work on

2023-02-22 Thread Shengyu Huang via Gcc
Hi Dave, > But a better place to look would probably be in our bugzilla; see the > links on the wiki page: > https://gcc.gnu.org/wiki/StaticAnalyzer > The "open bugs" list currently has 41 "RFE" bugs ("request for > enhancement" i.e. ideas for new features), some of which might make > suitable

[GSoC][Static Analyzer] Some questions and request for a small patch to work on

2023-02-21 Thread Shengyu Huang via Gcc
Dear all, I want to work on the Static Analyzer project and just started to read the documentation these days, but what’s mentioned in 27.1.6 in the internal document (https://gcc.gnu.org/onlinedocs/gccint/Analyzer-Internals.html#Analyzer-Internals) seems outdated or not detailed enough. For e

[GSoC] Help needed for building on aarch64-apple-darwin22.1.0

2023-02-20 Thread Shengyu Huang via Gcc
Dear all, After following the instructions here (https://gcc.gnu.org/wiki/InstallingGCC) and here (https://gcc.gnu.org/install/index.html), the `make` step simply fails with “*** Configuration aarch64-apple-darwin22.1.0 not supported”. I found this issue on Bugzilla (https://gcc.gnu.org/bugzill