Re: A weird bug

2021-03-05 Thread Martin Liška

On 3/4/21 11:06 PM, Gary Oblock via Gcc wrote:

$ gcc -v

...

Thread model: posix
gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)


Which is a system compiler and not the built GCC master.

Martin


GSoC 2021 - Static analyzer project

2021-03-05 Thread Ankur Saini via Gcc
Hello,

While looking for some project to contribute on for GSOC 2021, I came across 
project about extending static analyser pass, especially the part that involve 
adding C++ support to it.

I have already used -fanalyzer option ( which I initially came to know about 
via some blog post ) a couple of times to make debugging process of some of my 
C projects easier and faster ( especially thanks to the part where it also 
provides CWE code of the error along with the error message )  but always 
wanted a C++ version of it ever since ( as that is the language I use the most 
), and finding it as a project idea for this years GSOC sounded a perfect 
opportunity for me to try and contribute something to this project.

I have already built the compiler from the source code and was able to run a 
testsuit for it as mentioned in “Before you apply” section of the “Summer Of 
Code” page of gcc (https://gcc.gnu.org/wiki/SummerOfCode 
),

currently I am in process of reading this ( 
https://gcc.gnu.org/onlinedocs/gccint/Analyzer-Internals.html#Analyzer-Internals
 
)
 documentation to understand how things are going on under the hood and trying 
to make sense out of the source code of the analyzer itself with the help of it.

I have some questions before applying

- Am I on right path before applying for the project ? 

- Is there a way I can contribute some small bug fixes before applying for the 
real project itself 
( although I am scanning the bug 
tracker(https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=SUSPENDED&bug_status=WAITING&bug_status=REOPENED&bug_status=VERIFIED&component=analyzer&product=gcc
 
)
 for any potential quick fix but any help in finding one would be a great ) ? 

- Is there anything else I should be aware of before applying ?

Thanks,
Ankur

gcc-9-20210305 is now available

2021-03-05 Thread GCC Administrator via Gcc
Snapshot gcc-9-20210305 is now available on
  https://gcc.gnu.org/pub/gcc/snapshots/9-20210305/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.

This snapshot has been generated from the GCC 9 git branch
with the following options: git://gcc.gnu.org/git/gcc.git branch releases/gcc-9 
revision 2b4fcfcf12914e69b5b3e4b4eb29997be3bbea5b

You'll find:

 gcc-9-20210305.tar.xzComplete GCC

  SHA256=aadb42428f2969a509efc93d37fde4f2ee4ddb4d380b7448a0b2b63ee8058c89
  SHA1=7d2a9595c59026f8f3d0d3223d5ded7ba1a330e1

Diffs from 9-20210226 are available in the diffs/ subdirectory.

When a particular snapshot is ready for public consumption the LATEST-9
link is updated and a message is sent to the gcc list.  Please do not use
a snapshot before it has been announced that way.


Re: GSoC 2021 - Static analyzer project

2021-03-05 Thread David Malcolm via Gcc
On Fri, 2021-03-05 at 17:04 +0530, Ankur Saini via Gcc wrote:
> Hello,

Hi Ankur

> While looking for some project to contribute on for GSOC 2021, I came
> across project about extending static analyser pass, especially the
> part that involve adding C++ support to it.
> 
> I have already used -fanalyzer option ( which I initially came to
> know about via some blog post ) a couple of times to make debugging
> process of some of my C projects easier and faster ( especially
> thanks to the part where it also provides CWE code of the error along
> with the error message )  but always wanted a C++ version of it ever
> since ( as that is the language I use the most ), and finding it as a
> project idea for this years GSOC sounded a perfect opportunity for me
> to try and contribute something to this project.
> 
> I have already built the compiler from the source code and was able
> to run a testsuit for it as mentioned in “Before you apply” section
> of the “Summer Of Code” page of gcc (   
> https://gcc.gnu.org/wiki/SummerOfCode <   
> https://gcc.gnu.org/wiki/SummerOfCode>),
> currently I am in process of reading this (
> https://gcc.gnu.org/onlinedocs/gccint/Analyzer-Internals.html#Analyzer-Internals
>  <   
> https://gcc.gnu.org/onlinedocs/gccint/Analyzer-Internals.html#Analyzer-Internals
> >) documentation to understand how things are going on under the hood
> and trying to make sense out of the source code of the analyzer
> itself with the help of it.

Sounds great.

> I have some questions before applying
> 
> - Am I on right path before applying for the project ? 

What you're doing sounds like the right approach.

> - Is there a way I can contribute some small bug fixes before
> applying for the real project itself 
> ( although I am scanning the bug tracker(   
> https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=SUSPENDED&bug_status=WAITING&bug_status=REOPENED&bug_status=VERIFIED&component=analyzer&product=gcc
>  <   
> https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=SUSPENDED&bug_status=WAITING&bug_status=REOPENED&bug_status=VERIFIED&component=analyzer&product=gcc
> >) for any potential quick fix but any help in finding one would be a
> great ) ? 

I fear that at this point I've fixed all the easy bugs and it's only
the more difficult ones remaining :(

If you run the analyzer on your own code, and can trigger a false
positive or a false negative with the analyzer on it, and try to figure
out the issue, that could be a useful step (though it might turn out to
be a difficult one to fix, of course...)


There is a tracker bug for C++ support in the analyzer here:
  https://gcc.gnu.org/bugzilla/showdependencytree.cgi?id=97110
though obviously that would be actually doing the project itself.

To set expectations of what's reasonable to do in one summer - I don't
expect someone to be able to fully implement C++ support in one GSoC
project; for example, both of
  (a) implementing exception-handling and
  (b) implementing RTTI/vfuncs
are each probably big enough by themselves to take all summer.  So you
might want to pick one of those two to focus on (there are some notes
on each in the bugzilla comments).

> - Is there anything else I should be aware of before applying ?

I think if you've read the internals doc and the various organization
stuff on https://gcc.gnu.org/wiki/SummerOfCode page you're on the right
lines.

Hope this is helpful; good luck!

Dave