On Tue, Dec 10, 2002 at 11:20:07AM -0500, Parks, Chauni wrote:
> I recently wrote a dissector for my middleware code. However, once I select
> a frame , select Decode As and select my plugin, Ethereal crashes with a
> Segmentation Fault. Which produces an error similar to the following:
>
> _IO_vfprintf (s=0xbffff0a4, format=0x8 "", <Address= 0x200740 out of bounds,
> ap=0xbffff1f0)
> at printf-parse.h:95
> printf-parse.h: No such file or directory.
>
> Does anyone know where this file is located?
In the source code to the C library in the OS on which you built the
program. (I.e., it's not part of Ethereal, it's part of the OS.)
> Or who might be calling it?
The "printf" in the header file name and the function name indicates
that it's probably ultimately getting called from one of the "printf"
family of routines; if, for example, you're calling
"proto_tree_add_text()" in your dissector, that ultimately causes
"snprintf()" to be called.
It looks as if you ran gdb on the core dump to get the information
above; you should use the "backtrace" command to get a full stack trace,
which (assuming the bug isn't one where the stack is overwritten) should
show you what routine is causing "_IO_vfprintf()" to be called.
My guess is that there's a bug in your dissector in a call to
"proto_tree_add_text()" or one of the "proto_tree_add_XXX_format()"
routines, where a bad pointer is being passed as an argument.