unreasonably long runtime for a crafted file
@tobiasmue
Submitted by Tobias Mueller Link to original bug (#776817)
Description
The attached file takes unreasonably long time to load with pixbuf-read. I tried to profile with gprof, but it shows an empty profile for me. I guess I'm just doing things wrongly. callgrind eventually decided to commit suicide:
==28814== brk segment overflow in thread #1: can't grow to 0x4a7e000
success
==28814==
==28814== Process terminating with default action of signal 27 (SIGPROF)
==28814== at 0x54D321F: write_gmon (gmon.c:354)
==28814== by 0x54D3999: _mcleanup (gmon.c:422)
==28814== by 0x5404FF7: __run_exit_handlers (exit.c:82)
==28814== by 0x5405044: exit (exit.c:104)
==28814== by 0x53EB836: (below main) (libc-start.c:325)
==28814==
==28814== Events : Ir
==28814== Collected : 610590616710
==28814==
==28814== I refs: 610,590,616,710
fish: “valgrind --tool=callgrind ./te…” terminated by signal SIGPROF (Profiling timer expired)
It still showed this, though:
>callgrind_annotate callgrind.out.28814
--------------------------------------------------------------------------------
Profile data file 'callgrind.out.28814' (creator: callgrind-3.11.0)
--------------------------------------------------------------------------------
I1 cache:
D1 cache:
LL cache:
Timerange: Basic block 0 - 106893912868
Trigger: Program termination
Profiled target: ./tests/.libs/pixbuf-read longfile (PID 28814, part 1)
Events recorded: Ir
Events shown: Ir
Event sort order: Ir
Thresholds: 99
Include dirs:
User annotated:
Auto-annotation: off
--------------------------------------------------------------------------------
Ir
--------------------------------------------------------------------------------
610,582,991,394 PROGRAM TOTALS
--------------------------------------------------------------------------------
Ir file:function
--------------------------------------------------------------------------------
258,203,389,650 gdk-pixbuf/pixops/pixops.c:scale_line [/tmp/gdkpb/lib/libgdk_pixbuf-2.0.so.0.3602.0]
206,236,767,397 gdk-pixbuf/pixops/pixops.c:0x000000000006a7b0 [/tmp/gdkpb/lib/libgdk_pixbuf-2.0.so.0.3602.0]
95,011,180,723 gdk-pixbuf/pixops/pixops.c:pixops_process [/tmp/gdkpb/lib/libgdk_pixbuf-2.0.so.0.3602.0]
47,350,361,178 gdk-pixbuf/pixops/pixops.c:process_pixel [/tmp/gdkpb/lib/libgdk_pixbuf-2.0.so.0.3602.0]
Version: git master
Edited by Bastien Nocera