Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Strange (or at least interesting) printf() behavior!



On Mon, Jan 03, 2011 at 08:01:36AM -0800, Paul Goyette wrote:
> Program received signal SIGINT, Interrupt.
> 0x00007f7ffd89835d in strncasecmp () from /usr/lib/libc.so.12
> (gdb) bt
> #0  0x00007f7ffd89835d in strncasecmp () from /usr/lib/libc.so.12
> #1  0x00007f7ffd8998c1 in free () from /usr/lib/libc.so.12
> #2  0x00007f7ffd899da4 in free () from /usr/lib/libc.so.12
> #3  0x00007f7ffd89b125 in malloc () from /usr/lib/libc.so.12
> #4  0x00007f7ffd8e6a1f in __smakebuf () from /usr/lib/libc.so.12
> #5  0x00007f7ffd8e68bd in __swsetup () from /usr/lib/libc.so.12
> #6  0x00007f7ffd8c9440 in __vfprintf_unlocked () from /usr/lib/libc.so.12
> #7  0x00007f7ffd8cc078 in vfprintf () from /usr/lib/libc.so.12
> #8  0x00007f7ffd8c709a in printf () from /usr/lib/libc.so.12
> #9  0x0000000000400b3a in main (argc=1, argv=0x7f7fffffda98) at 
> FPE_test.c:31
> (gdb) fr 9
> #9  0x0000000000400b3a in main (argc=1, argv=0x7f7fffffda98) at 
> FPE_test.c:31
> 31              printf("FPE signal handler invoked %d times.\n", 
> flt_signal);

I would look at the libc object code and sort out the actual
functions involved.
I think there some static functions in there that are confusing
things somewhat - strncasecmp() is very unlikely there!

It might also be worth continuing and interrupting it a few times
to try to identify the range of the presumed code look.

It might even be that only malloc() is stuffed - try a malloc call
prior to the printf!

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index