https://gcc.gnu.org/bugzilla/show_bug.cgi?id=129066

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2026-11-26
                 CC|                            |hubicka at gcc dot gnu.org,
                   |                            |jamborm at gcc dot gnu.org
      Known to fail|                            |13.5.0

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.

 local analysis of search/7
   scanning: _1 = approve (arg_5(D));
  scanning: if (_1 == 0)
  scanning: _11 = strdup (arg_5(D));
  scanning: snprintf (&surl, 1400, "%s?q=%s", "w://find", arg_5(D));
  scanning: note (&surl);
  scanning: _9 = fetch_as_text (&surl);
  scanning: return _2;
    checking previously known:
Found search to be candidate for malloc attribute
Function is locally const.
Function can locally free.
 neither


 local analysis of fetch_as_text/6
   scanning: _1 = start (url_5(D), &werr, 64);
  scanning: if (_1 != 0)
  scanning: _8 = reason (&werr);
  scanning: return _2;
    checking previously known:
fetch_as_text/6 is not a malloc candidate, reason: phi arg is not SSA_NAME.

fetch_as_text/6 is not a malloc candidate, reason: phi arg is not SSA_NAME.
Function is locally const.
 neither
...

MALLOC LATTICE Initial:
strdup/11: malloc
main/9: malloc_bottom
process/8: malloc_bottom
search/7: malloc_top
fetch_as_text/6: malloc_bottom
note/5: malloc_bottom
approve/4: malloc_bottom
reason/3: malloc
start/2: malloc_bottom
Function search/7 found to be malloc
Function reason/3 found to be malloc

MALLOC LATTICE after propagation:
strdup/11: malloc
main/9: malloc_bottom
process/8: malloc_bottom
search/7: malloc
fetch_as_text/6: malloc_bottom
note/5: malloc_bottom
approve/4: malloc_bottom
reason/3: malloc
start/2: malloc_bottom
callgraph:

not sure how this works out - fetch_as_text/6 is inlined:

search/7 (search) 
  Type: function definition analyzed
  Visibility: semantic_interposition prevailing_def_ironly
  Aux: @0x532fd10
  References:
  Referring: 
  Availability: local
  Function flags: count:1073741824 (estimated locally) body local
  Called by: process/8 (1073741824 (estimated locally),1.00 per call)
  Calls: fetch_as_text/6 (inlined) (708669600 (estimated locally),0.66 per
call) note/5 (708669600 (estimated locally),0.66 per call) snprintf/10
(708669600 (estimated locally),0.66 per call) strdup/11 (365072224 (estimated
locally),0.34 per call) approve/4 (1073741824 (estimated locally),1.00 per
call)

Reply via email to