Hi David,

I have completed the assignment (Newbies guide), I have the developer build
completed. After many tries, I had implemented the "inform
(UNKNOWN_LOCATION, "hello world: %qE", cfun->decl);" call to gcc/passes.cc
as following:

if (pass->type == SIMPLE_IPA_PASS || pass->type == IPA_PASS)
    gcc_assert (!cfun && !current_function_decl);
  else
    gcc_assert (cfun && current_function_decl);

  if (cfun && cfun->decl)
  {
    inform (UNKNOWN_LOCATION, "hello world: %qE", cfun->decl);
  }

also executed the gdb --args ./gcc/xgcc testfile.c
and saw the workflow of the compiler from the passes.cc breakpoint I added.

For the GSOC 2026, following your suggestion i checked for
gcc/analyzer/kf.cc and i the known functions (specifically POSIX strings
API's) i found strnlen(), strcasecmp(). strsep() to be missing. So, i
specifically decided to move forward with strnlen() POSIX as for now. I
have made some small conditional checks:
Can you please verify them ? So, if any missing, i can add and go with
understanding the code for those conditions with your guidance.

strnlen(ptr, n)
1) arg(0) checking for valid pointer,
2) to check for buffer bounds whether n to be accessed is greater then
memory allocated for ptr,
3) Returned length(L) must be 0 <= L <= n.

Looking for your guidance.
Your's Sincerely,
Saish Kambali

Reply via email to