Bug#368459: backtrace.3 revised
On Sat, May 27, 2006 at 01:01:05PM -0400, pryzbyj wrote:
> Included is a revised copy of backtrace.3.
>
> Michael:
>
> I was tempted to use an alternate loop condition in h():
>
> for (sz=1; (sz&(sz-1))==0 && (sz<<=1); ) {
> if (NULL==(vec=realloc(vec, sz*sizeof(*vec)))) {
> perror("realloc");
> exit(EXIT_FAILURE);
> }
>
> sz=backtrace(vec, sz);
> }
>
> but I anticipated that you feel this is not the place to teach people
> about the properties of powers of two. I mention it here in case I
> was wrong :)
>
> BTW, |expand -t4 should be useful in the future when I forget your tab
> preference.
For some reason the example program I sent hangs (forever?) when
niterations is either 2 or 10:
15017 pryzbyj 25 0 1624 396 328 R 93.9 0.3 31:54.35 bt
I also opened bug #368459 against libc6, since valgrind complains
about invalid reads and use of uninit values; this might just be
because backtracing does unportable things that might generally be
undefined. If so, it is IMO still a (minor) bug, and libc6 or
valgrind should include relevant supressions or whatever is needed to
make it quiet.
Justin
Reply to: