On 1/5/06, Michal Marek <mm...@su...> wrote:
>
> Hi,
>
> we found a bug in doxygen-1.4.6, which causes it to segfault sometimes
> (I couldn't create a simple testcase though). In 1.4.6, the following
> code was added to doxygen.cpp:
>
> + if (! // not a php array
> + (md->getFileDef() &&
> getLanguageFromFileName(md->getFileDef()->name())=3D=3DSrcLangExt_PHP) &&
> + (md->argsString()!=3Droot->args && root->args.find('[')!=3D-=
1)
> + )
> + // not a php array variable
> + {
> ...
>
> however, this doesn't check the return value of md->getFileDef() (as it
> is done on other places). This seems to fix the segfault:
>
> --- src/doxygen.cpp
> +++ src/doxygen.cpp
> @@ -1912,7 +1912,7 @@
> // variable already in the scope
> {
> if (! // not a php array
> -
> (getLanguageFromFileName(md->getFileDef()->name())=3D=3DSrcLangExt_PHP) &=
&
> + (md->getFileDef() &&
> getLanguageFromFileName(md->getFileDef()->name())=3D=3DSrcLangExt_PHP) &&
> (md->argsString()!=3Droot->args && root->args.find('[')!=3D-=
1)
> )
> // not a php array variable
>
> Michal Marek
> SuSE CR
This is indeed a bug. It seems to be possible to trigger it when using tag
files and namespaces. Your patch will be included in the next CVS update.
Regards,
Dimitri
|