Re: [PHP4BETA] Segmentation fault - any indea?
| From: | Teodor Cimpoesu | Date: | Mon, 09 Aug 1999 14:50:34 +0000 |
| Subject: | Re: [PHP4BETA] Segmentation fault - any indea? | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-3232@lists.php.net to get a copy of this message | ||
"Thies C. Arntzen" wrote:
>
> hi,
>
> please send me the string you want to unserialize, i'll have a look!
>
> tc
hmm,see, there is a problem here. I'm not the one who does it, but php.
I use shm_(put|get)_var() which serialize the stuff when puting and
unserialize it
when getting.
Now I have a fuzzy idea about it:
I have an array $users_array which is stored in shm.
But when I first call shm_attach (so when it does the proper allocation
of segment)
there is no $users_array there, so shm_get_var() must fail on getting
$users_array.
With php3.0.12 I test that with is_array($users_array), and if it's not
I know it must
be the first call so I have to do the init() stuff.
Now, I think it fails because there's no $users_array in shm at the
moment I call
shm_get_var() which tries to unserialize an unexisting variable.
>
> On Mon, 9 Aug 1999, Teodor Cimpoesu wrote:
>
> > (gdb) run -X
> > Starting program: /opt/apache2/bin/./httpd -X
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x8095191 in php3api_var_unserialize (rval=0xbfffe43c, p=0xbfffda4c,
> > max=0x4019f03c "") at var.c:314
> > 314 (*rval)->type = IS_LONG;
> > (gdb) list
> > 309 }
> > 310 (*p)++;
> > 311 if (cur == 'b') {
> > 312 (*rval)->type = IS_BOOL;
> > 313 } else {
> > 314 (*rval)->type = IS_LONG;
> > 315 }
> > 316 INIT_PZVAL(*rval);
> > 317 (*rval)->value.lval = atol(q + 2);
> > 318 return 1;
> >
> > is there any (related) bug to this?
> > I searched the bugs.php.net but didn't find, so I submited a new one
> > (#2003)
> > config: RH6, PHP4 latest CVS (9-Aug-99), Apache-1.3.8-dev.
> >
> > --
> > CIMPOESU Teodor, Web Programmer
> >
> > @ DIGICOM S.A. Bucharest, Romania
> > @ Internet, site development
> > @ teo@digiro.net,+(401)-330.47.28
> >
> > official home page ~ http://www.digiro.net/
> > Internet web page ~ http://internet.digiro.net/
> >
> > --
> > PHP 4 Beta
> >
> >
>
> Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!"
> Digital Collections Phone +49 40 235350 Fax +49 40 23535180
> Hammerbrookstr. 93 20097 Hamburg / Germany
--
CIMPOESU Teodor, Web Programmer
@ DIGICOM S.A. Bucharest, Romania
@ Internet, site development
@ teo@digiro.net,+(401)-330.47.28
official home page ~ http://www.digiro.net/
Internet web page ~ http://internet.digiro.net/