public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: GSoC Timeline Review
@ 2024-04-02 14:35 Martin Jambor
  2024-04-04  2:38 ` Eric Feng
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Jambor @ 2024-04-02 14:35 UTC (permalink / raw)
  To: Nada Elsayed, gcc; +Cc: David Malcolm, ef2648

Hello,

On Sat, Mar 30 2024, Nada Elsayed via Gcc wrote:
> I think that I didn't fully understand the project, so I read more and
> updated the Timeline Suggestion.

Sorry that we were for not being able to respond sooner, Easter got into
way in an unfortunate way.  I do not know much about Cython or static
analysis (so I would not be able to give much advice about improvements
to the time-line), but can confirm we have received your application.

Thanks a lot.

Martin

>
> Suggested Timeline:
>
>    -
>
>    May 1-26:
>    -
>
>       Explore Cython modules and try more realistic codes to see how it
>       translates Python to c/c++.
>       -
>
>       Know more about entry-points that Cython uses.
>       -
>
>       Understand common bugs that happen when converting Python to c/c++.
>
>
>
>    -
>
>    Explore static analysis tool for CPython Extension code -which is
>    written in Python- and try this analyzer to understand the bugs in
>    translated Python code fully.
>    -
>
>    Know how we can emit warnings and errors.
>
>
>
>    -
>
>    Debug the codebase to grasp its structure and potential areas for
>    improvement.
>
>
>    -
>
>    Weeks 1-2:
>    -
>
>       Understand more about reference counting verification.
>       -
>
>       Develop verifying reference counts for PyObjects passed as parameters.
>       -
>
>    Weeks 3-4:
>    -
>
>       Begin to investigate Error Handling Checking.
>       -
>
>       Understand how the Static Analysis tool does Error Handling checking.
>       -
>
>       Implement these checks in the plugin.
>       -
>
>    Weeks 5-7:
>    -
>
>       Begin to investigate Exception Handling Checking.
>       -
>
>       Understand how the Static Analysis tool does Exception Handling
>       checking.
>       -
>
>       Implement these checks in the plugin.
>       -
>
>    Weeks 8-11
>    -
>
>       Begin to investigate Format String Checking.
>       -
>
>       Understand how the Static Analysis tool does Format String Checking.
>       -
>
>       Implement these checks in the plugin.
>       -
>
>    Week 12
>    -
>
>       Writing the GSoC wrapping-up document.
>
>
> ‫في الأربعاء، 27 مارس 2024 في 2:31 ص تمت كتابة ما يلي بواسطة ‪Nada
> Elsayed‬‏ <‪nadaelsayed163@gmail.com‬‏>:‬
>
>> Greetings All,
>> Hope this email finds you well.
>> I am interested in "Extend the plugin to add checking for usage of the
>> CPython API" project. First of all, I built the library, and now I am
>> trying to debug it. Then, I also used Cpython in 3 demos to understand how
>> it works. Finally, I read the uploaded patch comments to understand the
>> codebase and file structure.
>>
>> I was wondering if you could review my suggested timeline?
>> suggested Timeline:
>>
>>    -
>>
>>    May 1-26:
>>    -
>>
>>       Explore Cython modules, emphasizing entry-points and bug
>>       identification.
>>       -
>>
>>       Study analyzers, particularly cpy-analyzer, to enhance
>>       understanding.
>>       -
>>
>>       Debug the codebase to grasp its structure and potential areas for
>>       improvement.
>>       -
>>
>>       Focus investigation on "errors in GIL handling" and "tp_traverse
>>       errors".
>>       -
>>
>>    Weeks 1-6:
>>    -
>>
>>       Investigate GIL (Global Interpreter Lock) errors extensively.
>>       -
>>
>>       Engage in discussions and develop viable solutions to address
>>       identified issues.
>>
>>
>>
>>    -
>>
>>    Weeks 7-12:
>>    -
>>
>>       Gain insight into the functioning of the Garbage Collector.
>>       -
>>
>>       Implement checks to mitigate traverse errors effectively.
>>       -
>>
>>       Ensure robust error handling mechanisms are in place through
>>       thorough study and practical implementation.
>>
>>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GSoC Timeline Review
  2024-04-02 14:35 GSoC Timeline Review Martin Jambor
@ 2024-04-04  2:38 ` Eric Feng
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Feng @ 2024-04-04  2:38 UTC (permalink / raw)
  To: Nada Elsayed; +Cc: gcc, David Malcolm

[-- Attachment #1: Type: text/plain, Size: 5872 bytes --]

Hi Nada,

Apologies for not being able to reply earlier as well. I’m glad to hear
you’re interested in continuing this project! There is still a lot of work
to be done — my work from last summer is in a very prototype stage. As
David mentioned, familiarizing myself with the analyzer took some time, but
I'm confident you’ll be able to make quicker progress if you're more
experienced. If you’re interested in continuing to work on the reference
count checking aspect of the project in a similar direction to what I was
doing, this bugzilla post might be helpful:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107646. Specifically, David
and I discussed the challenge of scaling the implementation effectively,
particularly when tracking the behavior of every API entrypoint through
subclassing of known functions, and how we might reduce some of this effort
with function attributes. Moreover, you might also be interested in
exploring the work presented by Xutong Ma et al. at ASE 2023 late last
summer, titled “Detecting Memory Errors in Python Native Code by Tracking
Object Lifecycle with Reference Count,” as well as the works it was
compared against, if you’re interested in exploring alternative approaches.
Overall, I hope you find the experience as enriching as I did should you
work on this project! Please feel free to reach out with any questions and
I’ll be more than happy to help where I can.

Best,
Eric


On Tue, Apr 2, 2024 at 10:35 AM Martin Jambor <mjambor@suse.cz> wrote:

> Hello,
>
> On Sat, Mar 30 2024, Nada Elsayed via Gcc wrote:
> > I think that I didn't fully understand the project, so I read more and
> > updated the Timeline Suggestion.
>
> Sorry that we were for not being able to respond sooner, Easter got into
> way in an unfortunate way.  I do not know much about Cython or static
> analysis (so I would not be able to give much advice about improvements
> to the time-line), but can confirm we have received your application.
>
> Thanks a lot.
>
> Martin
>
> >
> > Suggested Timeline:
> >
> >    -
> >
> >    May 1-26:
> >    -
> >
> >       Explore Cython modules and try more realistic codes to see how it
> >       translates Python to c/c++.
> >       -
> >
> >       Know more about entry-points that Cython uses.
> >       -
> >
> >       Understand common bugs that happen when converting Python to c/c++.
> >
> >
> >
> >    -
> >
> >    Explore static analysis tool for CPython Extension code -which is
> >    written in Python- and try this analyzer to understand the bugs in
> >    translated Python code fully.
> >    -
> >
> >    Know how we can emit warnings and errors.
> >
> >
> >
> >    -
> >
> >    Debug the codebase to grasp its structure and potential areas for
> >    improvement.
> >
> >
> >    -
> >
> >    Weeks 1-2:
> >    -
> >
> >       Understand more about reference counting verification.
> >       -
> >
> >       Develop verifying reference counts for PyObjects passed as
> parameters.
> >       -
> >
> >    Weeks 3-4:
> >    -
> >
> >       Begin to investigate Error Handling Checking.
> >       -
> >
> >       Understand how the Static Analysis tool does Error Handling
> checking.
> >       -
> >
> >       Implement these checks in the plugin.
> >       -
> >
> >    Weeks 5-7:
> >    -
> >
> >       Begin to investigate Exception Handling Checking.
> >       -
> >
> >       Understand how the Static Analysis tool does Exception Handling
> >       checking.
> >       -
> >
> >       Implement these checks in the plugin.
> >       -
> >
> >    Weeks 8-11
> >    -
> >
> >       Begin to investigate Format String Checking.
> >       -
> >
> >       Understand how the Static Analysis tool does Format String
> Checking.
> >       -
> >
> >       Implement these checks in the plugin.
> >       -
> >
> >    Week 12
> >    -
> >
> >       Writing the GSoC wrapping-up document.
> >
> >
> > ‫في الأربعاء، 27 مارس 2024 في 2:31 ص تمت كتابة ما يلي بواسطة ‪Nada
> > Elsayed‬‏ <‪nadaelsayed163@gmail.com‬‏>:‬
> >
> >> Greetings All,
> >> Hope this email finds you well.
> >> I am interested in "Extend the plugin to add checking for usage of the
> >> CPython API" project. First of all, I built the library, and now I am
> >> trying to debug it. Then, I also used Cpython in 3 demos to understand
> how
> >> it works. Finally, I read the uploaded patch comments to understand the
> >> codebase and file structure.
> >>
> >> I was wondering if you could review my suggested timeline?
> >> suggested Timeline:
> >>
> >>    -
> >>
> >>    May 1-26:
> >>    -
> >>
> >>       Explore Cython modules, emphasizing entry-points and bug
> >>       identification.
> >>       -
> >>
> >>       Study analyzers, particularly cpy-analyzer, to enhance
> >>       understanding.
> >>       -
> >>
> >>       Debug the codebase to grasp its structure and potential areas for
> >>       improvement.
> >>       -
> >>
> >>       Focus investigation on "errors in GIL handling" and "tp_traverse
> >>       errors".
> >>       -
> >>
> >>    Weeks 1-6:
> >>    -
> >>
> >>       Investigate GIL (Global Interpreter Lock) errors extensively.
> >>       -
> >>
> >>       Engage in discussions and develop viable solutions to address
> >>       identified issues.
> >>
> >>
> >>
> >>    -
> >>
> >>    Weeks 7-12:
> >>    -
> >>
> >>       Gain insight into the functioning of the Garbage Collector.
> >>       -
> >>
> >>       Implement checks to mitigate traverse errors effectively.
> >>       -
> >>
> >>       Ensure robust error handling mechanisms are in place through
> >>       thorough study and practical implementation.
> >>
> >>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GSoC Timeline Review
  2024-04-02 14:06   ` David Malcolm
@ 2024-04-02 14:09     ` David Malcolm
  0 siblings, 0 replies; 6+ messages in thread
From: David Malcolm @ 2024-04-02 14:09 UTC (permalink / raw)
  To: Nada Elsayed, gcc; +Cc: ef2648

On Tue, 2024-04-02 at 10:06 -0400, David Malcolm wrote:
> What timezone are you in?  (I'm in EDT, UTC+4)

Sorry, that should be UTC-4 (on the east coast of the US)

Dave



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GSoC Timeline Review
  2024-03-30 11:54 ` Nada Elsayed
@ 2024-04-02 14:06   ` David Malcolm
  2024-04-02 14:09     ` David Malcolm
  0 siblings, 1 reply; 6+ messages in thread
From: David Malcolm @ 2024-04-02 14:06 UTC (permalink / raw)
  To: Nada Elsayed, gcc; +Cc: ef2648

On Sat, 2024-03-30 at 13:54 +0200, Nada Elsayed wrote:
> I think that I didn't fully understand the project, so I read more
> and
> updated the Timeline Suggestion.

Hi Nada

I'm very sorry for not responding sooner; I've been dealing with an 
difficult issue that's arisen outside of my computer work, but that's a
poor excuse.

The deadline for applications is in a few hours time, so please go
ahead and get an application in if you haven't done so already.  Google
are very strict about the deadlines.

Amongst other things, a good application should:

* describe/give evidence of your ability/skills in C++ (e.g. do you
have a github account?)
* describe/give evidence of your knowledge of the CPython extension
API.  I think you mentioned that you had done a experimented with this
to get a feel for it, and wrote some toy examples; can you send me the
code you wrote please?

If you've already posted an application, feel free to send this info
separately to me (and I'm sorry again for leaving my reply so late).

Have you tried building GCC from source yet?  That would be a good
thing to do (and to mention in an application).

Various notes inline below, throughout...

> 
> Suggested Timeline:
> 
>    -
> 
>    May 1-26:
>    -
> 
>       Explore Cython modules and try more realistic codes to see how
> it
>       translates Python to c/c++.


Note that "Cython" and "CPython" are different things.

"CPython" is the C implementation of Python (i.e. the one that most
people use, as opposed to, say, PyPy, which is a different
implementation of the language used by advanced users with performance
requirements).

"Cython" is a tool for generating .c source files for CPython extension
modules from a .pyx language that's a mixture of C and Python-like
syntax.

The project should primarily be about CPython extension modules.  The
code generated by Cython tends to be correct, so I'm much less
interested in analyzing it.

So in your proposal above it should talk about CPython, rather than
Cython.

>       -
> 
>       Know more about entry-points that Cython uses.

Similarly here.



>       -
> 
>       Understand common bugs that happen when converting Python to
> c/c++.
> 
> 
> 
>    -
> 
>    Explore static analysis tool for CPython Extension code -which is
>    written in Python- and try this analyzer to understand the bugs in
>    translated Python code fully.

Sadly this old project of mine has been bit-rotting for years, and
doesn't work well anymore.  But hopefully it's still useful for getting
ideas.

>    -
> 
>    Know how we can emit warnings and errors.
> 
> 
> 
>    -
> 
>    Debug the codebase to grasp its structure and potential areas for
>    improvement.

I'd like us also to create a page on the gcc wiki to capture some of
the ideas.

> 
> 
>    -
> 
>    Weeks 1-2:
>    -
> 
>       Understand more about reference counting verification.
>       -
> 
>       Develop verifying reference counts for PyObjects passed as
> parameters.
>       -
> 
>    Weeks 3-4:
>    -
> 
>       Begin to investigate Error Handling Checking.
>       -
> 
>       Understand how the Static Analysis tool does Error Handling
> checking.
>       -
> 
>       Implement these checks in the plugin.
>       -
> 
>    Weeks 5-7:
>    -
> 
>       Begin to investigate Exception Handling Checking.
>       -
> 
>       Understand how the Static Analysis tool does Exception Handling
>       checking.
>       -
> 
>       Implement these checks in the plugin.
>       -
> 
>    Weeks 8-11
>    -
> 
>       Begin to investigate Format String Checking.
>       -
> 
>       Understand how the Static Analysis tool does Format String
> Checking.
>       -
> 
>       Implement these checks in the plugin.
>       -
> 
>    Week 12
>    -
> 
>       Writing the GSoC wrapping-up document.

This timeline is very ambitious; last year Eric spent a lot of time
simply understanding the way the analyzer represents the state of the
program.

> 
> 
> ‫في الأربعاء، 27 مارس 2024 في 2:31 ص تمت كتابة ما يلي بواسطة ‪Nada
> Elsayed‬‏ <‪nadaelsayed163@gmail.com‬‏>:‬
> 
> > Greetings All,
> > Hope this email finds you well.
> > I am interested in "Extend the plugin to add checking for usage of
> > the
> > CPython API" project. First of all, I built the library, and now I
> > am
> > trying to debug it. Then, I also used Cpython in 3 demos to
> > understand how
> > it works. Finally, I read the uploaded patch comments to understand
> > the
> > codebase and file structure.

As I mentioned above, please send me the demo code you wrote.

What timezone are you in?  (I'm in EDT, UTC+4)

Sorry again for now responding sooner, and if you haven't applied yet,
you should do that ASAP as it looks like the deadline is in 4 hours
time; prioritize getting that in over responding to my other questions.

Let me know if you need help with anything.

Thanks
Dave


> > 
> > I was wondering if you could review my suggested timeline?
> > suggested Timeline:
> > 
> >    -
> > 
> >    May 1-26:
> >    -
> > 
> >       Explore Cython modules, emphasizing entry-points and bug
> >       identification.
> >       -
> > 
> >       Study analyzers, particularly cpy-analyzer, to enhance
> >       understanding.
> >       -
> > 
> >       Debug the codebase to grasp its structure and potential areas
> > for
> >       improvement.
> >       -
> > 
> >       Focus investigation on "errors in GIL handling" and
> > "tp_traverse
> >       errors".
> >       -
> > 
> >    Weeks 1-6:
> >    -
> > 
> >       Investigate GIL (Global Interpreter Lock) errors extensively.
> >       -
> > 
> >       Engage in discussions and develop viable solutions to address
> >       identified issues.
> > 
> > 
> > 
> >    -
> > 
> >    Weeks 7-12:
> >    -
> > 
> >       Gain insight into the functioning of the Garbage Collector.
> >       -
> > 
> >       Implement checks to mitigate traverse errors effectively.
> >       -
> > 
> >       Ensure robust error handling mechanisms are in place through
> >       thorough study and practical implementation.
> > 
> > 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GSoC Timeline Review
  2024-03-27  0:31 Nada Elsayed
@ 2024-03-30 11:54 ` Nada Elsayed
  2024-04-02 14:06   ` David Malcolm
  0 siblings, 1 reply; 6+ messages in thread
From: Nada Elsayed @ 2024-03-30 11:54 UTC (permalink / raw)
  To: gcc; +Cc: David Malcolm, ef2648

[-- Attachment #1: Type: text/plain, Size: 3396 bytes --]

I think that I didn't fully understand the project, so I read more and
updated the Timeline Suggestion.

Suggested Timeline:

   -

   May 1-26:
   -

      Explore Cython modules and try more realistic codes to see how it
      translates Python to c/c++.
      -

      Know more about entry-points that Cython uses.
      -

      Understand common bugs that happen when converting Python to c/c++.



   -

   Explore static analysis tool for CPython Extension code -which is
   written in Python- and try this analyzer to understand the bugs in
   translated Python code fully.
   -

   Know how we can emit warnings and errors.



   -

   Debug the codebase to grasp its structure and potential areas for
   improvement.


   -

   Weeks 1-2:
   -

      Understand more about reference counting verification.
      -

      Develop verifying reference counts for PyObjects passed as parameters.
      -

   Weeks 3-4:
   -

      Begin to investigate Error Handling Checking.
      -

      Understand how the Static Analysis tool does Error Handling checking.
      -

      Implement these checks in the plugin.
      -

   Weeks 5-7:
   -

      Begin to investigate Exception Handling Checking.
      -

      Understand how the Static Analysis tool does Exception Handling
      checking.
      -

      Implement these checks in the plugin.
      -

   Weeks 8-11
   -

      Begin to investigate Format String Checking.
      -

      Understand how the Static Analysis tool does Format String Checking.
      -

      Implement these checks in the plugin.
      -

   Week 12
   -

      Writing the GSoC wrapping-up document.


‫في الأربعاء، 27 مارس 2024 في 2:31 ص تمت كتابة ما يلي بواسطة ‪Nada
Elsayed‬‏ <‪nadaelsayed163@gmail.com‬‏>:‬

> Greetings All,
> Hope this email finds you well.
> I am interested in "Extend the plugin to add checking for usage of the
> CPython API" project. First of all, I built the library, and now I am
> trying to debug it. Then, I also used Cpython in 3 demos to understand how
> it works. Finally, I read the uploaded patch comments to understand the
> codebase and file structure.
>
> I was wondering if you could review my suggested timeline?
> suggested Timeline:
>
>    -
>
>    May 1-26:
>    -
>
>       Explore Cython modules, emphasizing entry-points and bug
>       identification.
>       -
>
>       Study analyzers, particularly cpy-analyzer, to enhance
>       understanding.
>       -
>
>       Debug the codebase to grasp its structure and potential areas for
>       improvement.
>       -
>
>       Focus investigation on "errors in GIL handling" and "tp_traverse
>       errors".
>       -
>
>    Weeks 1-6:
>    -
>
>       Investigate GIL (Global Interpreter Lock) errors extensively.
>       -
>
>       Engage in discussions and develop viable solutions to address
>       identified issues.
>
>
>
>    -
>
>    Weeks 7-12:
>    -
>
>       Gain insight into the functioning of the Garbage Collector.
>       -
>
>       Implement checks to mitigate traverse errors effectively.
>       -
>
>       Ensure robust error handling mechanisms are in place through
>       thorough study and practical implementation.
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* GSoC Timeline Review
@ 2024-03-27  0:31 Nada Elsayed
  2024-03-30 11:54 ` Nada Elsayed
  0 siblings, 1 reply; 6+ messages in thread
From: Nada Elsayed @ 2024-03-27  0:31 UTC (permalink / raw)
  To: gcc; +Cc: David Malcolm, ef2648

[-- Attachment #1: Type: text/plain, Size: 1330 bytes --]

Greetings All,
Hope this email finds you well.
I am interested in "Extend the plugin to add checking for usage of the
CPython API" project. First of all, I built the library, and now I am
trying to debug it. Then, I also used Cpython in 3 demos to understand how
it works. Finally, I read the uploaded patch comments to understand the
codebase and file structure.

I was wondering if you could review my suggested timeline?
suggested Timeline:

   -

   May 1-26:
   -

      Explore Cython modules, emphasizing entry-points and bug
      identification.
      -

      Study analyzers, particularly cpy-analyzer, to enhance understanding.
      -

      Debug the codebase to grasp its structure and potential areas for
      improvement.
      -

      Focus investigation on "errors in GIL handling" and "tp_traverse
      errors".
      -

   Weeks 1-6:
   -

      Investigate GIL (Global Interpreter Lock) errors extensively.
      -

      Engage in discussions and develop viable solutions to address
      identified issues.



   -

   Weeks 7-12:
   -

      Gain insight into the functioning of the Garbage Collector.
      -

      Implement checks to mitigate traverse errors effectively.
      -

      Ensure robust error handling mechanisms are in place through thorough
      study and practical implementation.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-04-04  2:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-02 14:35 GSoC Timeline Review Martin Jambor
2024-04-04  2:38 ` Eric Feng
  -- strict thread matches above, loose matches on Subject: below --
2024-03-27  0:31 Nada Elsayed
2024-03-30 11:54 ` Nada Elsayed
2024-04-02 14:06   ` David Malcolm
2024-04-02 14:09     ` David Malcolm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).