[Geany] Crash on some php files (opensolaris)

Andras Barna andras.barna at xxxxx
Wed Apr 23 13:48:36 UTC 2008

yes i stopped in vStringNCatS
after applying the patch:
(dbx) print matchTagPattern
`geany`lregex.c`matchTagPattern =
&`geany`lregex.c`matchTagPattern(const vString *const line, const
regexPattern *const patbuf, const regmatch_t *const pmatch) at
t at 1 (l at 1) signal SEGV (no mapping at the fault address) in strlen at 0xd018a940
0xd018a940: strlen+0x0030:	movl     (%eax),%ecx
Current function is error
  284       fprintf (errout, "%s: %s", getExecutableName (),
(dbx) where
current thread: t at 1
dbx: read of 4 bytes at address 3 failed
dbx: attempt to read frame failed -- cannot get return address
  [1] strlen(0x0), at 0xd018a940
  [2] _ndoprnt(0x81a485b, 0x8046e20, 0x81d08e0, 0x0), at 0xd01cbe26
  [3] _fprintf(0x81d08e0, 0x81a4859, 0x0, 0x81a484e), at 0xd01cdc9f
=>[4] error(selection = 2, format = 0x81a7c70 "%s:%ld: null expansion
of name pattern "%s"", ...), line 284 in "ctags.c"
  [5] matchTagPattern(line = 0x8a5a968, patbuf = 0x8a54d10, pmatch =
0x8046e88), line 464 in "lregex.c"
  [6] matchRegexPattern(line = 0x8a5a968, patbuf = 0x8a54d10), line
497 in "lregex.c"

PS: i'm neither a dbx professional :) (i'm using it because gdb
segfaults too when i try it with geany :P) , still need to read the
whole stuff here http://docs.sun.com/app/docs/doc/819-5257

On Wed, Apr 23, 2008 at 3:25 PM, Nick Treleaven
<nick.treleaven at btinternet.com> wrote:
> On Tue, 22 Apr 2008 20:39:04 +0300
> "Andras Barna" <andras.barna at gmail.com> wrote:
> > with -g3 and -Wdisabled-optimization
>  Thanks for the new trace.
>  Could you try the attached patch - I'm still not sure what the problem
>  is, but it should fix the actual reason of the segfault, and might
>  reveal the cause of the problem.
>  Maybe there is some code we should backport elsewhere in CTags, but
>  lregex.c and php.c don't have any relevant changes, so I'm not really
>  sure where to look.
>  One thing to try - can you print *line in the matchTagPattern() frame
>  of the segfault trace?
>  BTW, I'm not familiar with dbx, but why does the first trace for the
>  segfault end with the matchRegexPattern frame - is it possible to print
>  the frames below that? Is the second trace just for a breakpoint?
>  Regards,
>  Nick
> _______________________________________________
>  Geany mailing list
>  Geany at uvena.de
>  http://lists.uvena.de/cgi-bin/mailman/listinfo/geany


More information about the Users mailing list